2266ccdd67
The oss-parent configuration has been applied manually to the root pom.xml, except that now newer plugin versions are used for source and javadoc JAR creation, and for GPG signing. This required some reordering of the plugins for the gson module to make sure they are executed in the correct order. Otherwise this would cause failures for javadoc:jar.
3.6 KiB
3.6 KiB
Gson Release Process
The following is a step-by-step procedure for releasing a new version of Google-Gson.
- Go through all open bugs and identify which will be fixed in this release. Mark all others with an appropriate release tag. Identify duplicates, and close the bugs that will never be fixed. Fix all bugs for the release, and mark them fixed.
- Ensure all changelists are code-reviewed and have +1
cd gson
to the parent directory; ensure there are no open files and all changes are committed.- Run
mvn release:clean
- Do a dry run:
mvn release:prepare -DdryRun=true
- Start the release:
mvn release:prepare
- Answer questions: usually the defaults are fine. Try to follow Semantic Versioning when choosing the release version number.
- This will do a full build, change version from
-SNAPSHOT
to the released version, commit and create the tags. It will then change the version to-SNAPSHOT
for the next release.
- Complete the release:
mvn release:perform
- Log in to Nexus repository manager at Sonatype and close the staging repository for Gson.
- Download and sanity check all downloads. Do not skip this step! Once you release the staging repository, there is no going back. It will get synced with Maven Central and you will not be able to update or delete anything. Your only recourse will be to release a new version of Gson and hope that no one uses the old one.
- Release the staging repository for Gson. Gson will now get synced to Maven Central with-in the next hour. For issues consult Sonatype Guide.
- Update Gson Changelog. Also, look at all bugs that were fixed and add a few lines describing what changed in the release.
- Update version references in (version might be referenced multiple times):
- Optional: Create a post on the Gson Discussion Forum.
- Optional: Update the release version in Wikipedia and update the current "stable" release.
Configuring a machine for deployment to Sonatype Repository
This section was borrowed heavily from Doclava release process.
- Install/Configure GPG following this guide.
- Create encrypted passwords.
- Create
~/.m2/settings.xml
similar to as described in Doclava release process. - Now for deploying a snapshot repository, use
mvn deploy
.
Getting Maven Publishing Privileges
See OSSRH Publish Guide.
Running Benchmarks or Tests on Android
-
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"