The library is published to Maven Central with android team's sonatype account
You will need to create a private GPG keyring on your machine, if you don't have one do the following steps:
- Run
gpg --full-generate-key
- Choose
RSA and RSA
for the key type - Use
4096
for the key size - Use
0
for the expiration (never) - Use any name, email address, and password
This creates your key in ~/.gnupg/openpgp-revocs.d/
with .rev
format. The last 8 characters
before the .rev
extension are your Key ID.
To export the key, run:
gpg --export-secret-keys -o $HOME/sonatype.gpg
Finally upload your key to the keyserver:
gpg --keyserver keys.openpgp.org --send-keys <YOUR KEY ID>
Open your komposable-architecture/local.properties
file and fill in the values:
signing.keyId=<KEY ID> // 8 chars
signing.password=<PASSWORD YOU CHOSE>
signing.secretKeyRingFile=<PATH TO YOUR GPG FILE> // ../keyname.gpg
ossrhUsername=<SONATYPE TOKEN>
ossrhPassword=<SONATYPE TOKEN PASSWORD>
sonatypeStagingProfileId=<PROFILE ID>
SONATYPE TOKEN and TOKEN PASSWORD:
- Go to https://s01.oss.sonatype.org/
- Go to profile
- Change the pulldown from “Summary” to “User Token”
- Click on “Access User Token”
- The first part is the username, the second part is the password
PROFILE ID: This value is an ID that Sonatype assigns to you, which the plugin uses to make sure all the artifacts end up in the right place during the upload.
Go to https://s01.oss.sonatype.org/ and log in. In the menu on the left, select Staging profiles, select your profile, and then look for the ID in the URL.
To publish, run:
./gradlew publishReleasePublicationToSonatypeRepository
Follow the instructions here:
- Navigate to https://s01.oss.sonatype.org/ and Log In
- On the left side click Build Promotion and look for the
com.toggl
repo - Click Close ... wait a few minutes (you can check status with Refresh)
- Click Release
Another useful tutorial here