by: James Harmon (contact info in etherpad document)
Resources from Presentation: https://etherpad.mozilla.org/android-publish
JCenter is run by Bintray. Their tagline is:
“Forget about Maven Central”
Artifactory is a good option if you want an internally hosted repository. JCenter also can provide a private hosted repository.
If you publish to mavenCentral(), it will be available on jcenter() as well.
Sign up for a SonaType Acount (mavenCentral()) or a JCenter account. Jcenter seems to be easier and is the default these day for Android libraries, but this example is for SonaType:
- You need to select a group name like “com.handstandsam”
- Project url: http://handstandsam.com
- SCM URL: http://github.com/handstandsam/handstandpay.git if you want to give access to your code.
You’ll get an email back from SonaType approving you.
Create and Publish Key
Create PGP Key
gpg -gen-key
Find you Key ID:
gpg –list-keys
Key will look like: XXXXXX/YYYYYYYY <date>
YYYYYYYY is they key ID.
Now that you have the key, you can sign the library.
maven-push.gradle (you can include gradle files, so he separated this out)
Separate gradle file for pushing release and snapshot builds to repository.
Generate a pom.xml file using the ‘maven’ gradle plugin. This is useful for some repositories.
Check out your project’s depdencies using:
./gradlew app:dependencies
Example:
_releaseApk - ## Internal use, do not manually configure ## +--- com.android.support:appcompat-v7:22.2.0 | \--- com.android.support:support-v4:22.2.0 | \--- com.android.support:support-annotations:22.2.0 +--- com.jakewharton:butterknife:7.0.1 +--- com.jakewharton.timber:timber:3.1.0 \--- com.arcao:slf4j-timber:2.0 +--- org.slf4j:slf4j-api:1.7.12 \--- com.jakewharton.timber:timber:3.0.1 -> 3.1.0
Plugin for deploying gradle builds to jcenter from Nodova: https://github.com/novoda/bintray-release