An important step many may forget:
gradle connectedAndroidTest
You will need an Android emulator running to run the tests.
The version number needs to be increased. If it is a feature addition/change bump the second number (i.e. 2.X.0). If it is a patch/bug fix bump the last number (i.e. 2.0.X).
In the build.gradle
file also bump the versionCode
number by 1. This is an
Android thing.
The version number lives in:
Connection.java
undercom.kissmetrics.sdk
. It's in the constantUSER_AGENT
build.gradle
file at the root.- In the
README.md
file for the Gradle dependency
Get your changes into the master
branch. Then create a tag with the version:
git tag -a vX.Y.Z -m 'Version X.Y.Z'
git push origin vX.Y.Z
Where X.Y.Z
is your version number.
You can build everything you need with this command line and Gradle 2.3+:
gradle clean build compileReleaseSources javadocs javadocsJar sourcesJar
It will create the following files:
build/libs/KISSmetricsSDK-javadoc.jar
build/libs/KISSmetricsSDK-sources.jar
build/libs/KISSmetricsSDK.jar
build/outputs/aar/KISSmetricsSDK-debug.aar
build/outputs/aar/KISSmetricsSDK-release.aar
Create the Release on GitHub. You have to compress all the files in Step 4 since
Github won't accept jar files. Use the script create-release-tar.sh
to build
the file. It will appear as build/KISSmetricsSDK.tar.bz
.
To get the Jar/Pom files into JCenter (central Gradle repository) you'll have to do a little more work. First generate the pom file:
gradle install
The KISSmetricsSDK-2.3.1.pom
file will be placed under
~/.m2/repository/com/kissmetrics/sdk/KISSmetricsSDK/$VERSION
where $VERSION
is
the new version number (i.e. 2.3.1).
Create a new version of the package in Bintray. Upload the files in Step 4 and
KISSmetricsSDK-2.3.1.pom
to Bintray.