Skip to content

Latest commit

 

History

History
78 lines (52 loc) · 2.36 KB

PUBLISHING.md

File metadata and controls

78 lines (52 loc) · 2.36 KB

Publishing

Credentials

The library is published to Maven Central with android team's sonatype account

GPG Key

You will need to create a private GPG keyring on your machine, if you don't have one do the following steps:

  1. Run gpg --full-generate-key
  2. Choose RSA and RSA for the key type
  3. Use 4096 for the key size
  4. Use 0 for the expiration (never)
  5. 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>

Local Properties

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:

  1. Go to https://s01.oss.sonatype.org/
  2. Go to profile
  3. Change the pulldown from “Summary” to “User Token”
  4. Click on “Access User Token”
  5. 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.

mavencentral_sonatype_staging_profile (1)

Publish

To publish, run:

./gradlew publishReleasePublicationToSonatypeRepository

Release

Follow the instructions here:

  1. Navigate to https://s01.oss.sonatype.org/ and Log In
  2. On the left side click Build Promotion and look for the com.toggl repo
  3. Click Close ... wait a few minutes (you can check status with Refresh)
  4. Click Release

Another useful tutorial here