Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,37 +73,31 @@ var color = android.graphics.Color.rgb(r, g, b);

Docs:

- https://central.sonatype.org/publish/publish-maven/
- https://central.sonatype.org/publish/publish-portal-maven/
- https://central.sonatype.org/publish/requirements/gpg/
- https://central.sonatype.org/publish/generate-portal-token/

Set `~/m2/settings.xml`:
Generate a Portal token at https://central.sonatype.com, then set `~/.m2/settings.xml`:

```xml
<settings>
<servers>
<server>
<id>ossrh</id>
<username>hsluv</username>
<password>REDACTEDREDACTEDREDACTED</password>
<id>central</id>
<username><!-- your token username --></username>
<password><!-- your token password --></password>
</server>
<server>
<id>EBFD22439E5C59D664D0CFC750617B51F61187C2</id>
<passphrase><!-- your GPG key passphrase --></passphrase>
</server>
</servers>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.passphrase>REDACTEDREDACTEDREDACTED</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
```

Then run:

```bash
mvn versions:set -DnewVersion=0.3 # bump version
mvn clean deploy -P release
mvn clean deploy
```
20 changes: 6 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,17 @@
</dependency>
</dependencies>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<build>
<plugins>
<!-- https://central.sonatype.org/publish/publish-maven/ -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.11.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
<plugin>
Expand Down