#Gson Release Process
The following is a step-by-step procedure for releasing a new version of Google-Gson.
pom.xml
and update the versions listed for Export-Package to the target version. Also add any new Java packages that have been introduced in Gson.~/.m2/settings.xml
is configured properly (see steps below)cd gson
; ensure there are no open files and all changes are committed.mvn release:clean
mvn release:prepare -DdryRun=true
mvn release:prepare
-SNAPSHOT
to the released version, commit and create the tags. It will then change the version to -SNAPSHOT
for the next release.Ensure you have defined sonatype-nexus-staging
in your Maven settings.xml
and run:
mvn -s /home/<username>/.m2/settings.xml release:perform
Log in to Nexus repository manager at Sonatype and close the staging repository for Gson. If you run into an error regarding missing signatures, you need to manually upload the artifacts using mvn gpg:sign-and-deploy-file
for Gson binary, source and Javadoc jars.
cp -r ~/.m2/repository/com/google/code/gson/gson/1.7.2 /tmp cd /tmp/1.7.2 mvn gpg:sign-and-deploy-file \ -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \ -DrepositoryId=sonatype-nexus-staging \ -DpomFile=gson-1.7.2.pom \ -Dfile=gson-1.7.2-javadoc.jar \ -Dclassifier=javadoc mvn gpg:sign-and-deploy-file \ -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \ -DrepositoryId=sonatype-nexus-staging \ -DpomFile=gson-1.7.2.pom \ -Dfile=gson-1.7.2-sources.jar \ -Dclassifier=sources mvn gpg:sign-and-deploy-file \ -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \ -DrepositoryId=sonatype-nexus-staging \ -DpomFile=gson-1.7.2.pom \ -Dfile=gson-1.7.2.jar
# Switch to the branch `gh-pages` git checkout gh-pages # Unpack the generated Javadoc jar xvf /tmp/2.5/gson-2.5-javadoc.jar # Commit the new Javadoc git commit -m 'Updated Javadoc to 2.5' # Push changes to GitHub git push
This section was borrowed heavily from Doclava release process.
~/.m2/settings.xml
similar to as described in Doclava release process.mvn deploy
.Based on Gson group thread:
Download vogar
Put adb
on your $PATH
and run:
vogar --benchmark --classpath gson.jar path/to/Benchmark.java
For example, here is how to run the CollectionsDeserializationBenchmark:
export ANDROID_HOME=~/apps/android-sdk-mac_x86 export PATH=$PATH:$ANDROID_HOME/platform-tools/:$ANDROID_HOME/android-sdk-mac_x86/tools/ $VOGAR_HOME/bin/vogar \ --benchmark \ --sourcepath ../gson/src/main/java/ \ src/main/java/com/google/gson/metrics/CollectionsDeserializationBenchmark.java \ -- \ --vm "app_process -Xgc:noconcurrent,app_process"