HowTo Release - EsotericSoftware/kryo GitHub Wiki

Prerequisites

  • GPG key for signing the artifacts, published to a public keyserver such as keyserver.ubuntu.com. See https://central.sonatype.org/publish/requirements/gpg/. Check that it has not expired with gpg --list-keys.
  • Central Portal user token in ~/.m2/settings.xml as server central. Generate it at https://central.sonatype.com under "View Account" → "Generate User Token":
    <server>
       <id>central</id>
       <username>TOKEN_USERNAME</username>
       <password>TOKEN_PASSWORD</password>
    </server>
  • JDK 11 for Kryo 5 (master), JDK 25 for Kryo 6 (kryo-6 branch). The release profile enforces it.
  • SSH push access to the repository. release:prepare pushes the release commits and the tag.
  • japi-compliance-checker for the compatibility report: brew install japi-compliance-checker.

How To Release

  1. Prepare
    1. Make sure CI is green on latest master and your working tree is clean.
    2. Run the tests locally, because the release build skips them: mvn clean verify
    3. Kryo 6: check the API report target/japicmp/api-check.html that mvn verify writes. It compares the API with the newest release on Maven Central, so it lists every binary and source incompatible change since then. Make sure the release notes and MIGRATION.md mention them.
    4. Use the JDK of the release for all following Maven commands, eg export JAVA_HOME=$(/usr/libexec/java_home -v 25)
  2. Release with Maven
    1. mvn release:clean release:prepare -DreleaseVersion=$NEWVERSION -DdevelopmentVersion=$NEXTVERSION-SNAPSHOT. This creates and pushes the tag kryo-parent-$NEWVERSION.
    2. mvn release:perform. This builds, signs, and uploads all artifacts to the Central Portal.
  3. Publish the release on Maven Central
    1. Log in at https://central.sonatype.com and go to "Publish" → "Deployments".
    2. Wait until the deployment is "Validated", then click "Publish".
    3. The artifacts appear on https://repo1.maven.org/maven2/com/esotericsoftware/kryo/ after 15-30 minutes.
  4. Document the release
    1. Create the compatibility report from the repository root with japi-compliance-checker:
      1. Download kryo-$OLDVERSION.jar from Maven Central. The new jar is at target/checkout/target/kryo-$NEWVERSION.jar.
      2. Run japi-compliance-checker -lib kryo kryo-$OLDVERSION.jar kryo-$NEWVERSION.jar. This writes compat_reports/kryo/$OLDVERSION_to_$NEWVERSION/compat_report.html.
      3. git add the report.
    2. Update the README Recent Releases and Installation With Maven sections, including the snapshot version.
    3. Commit and push.
    4. Create the release at https://github.com/EsotericSoftware/kryo/releases for the tag kryo-parent-$NEWVERSION and attach target/checkout/target/kryo-$NEWVERSION-all.zip.

Kryo 6.0.0

After the 6.0.0 release, set kryo.api.check.breakBuild to true in main/pom.xml. From then on, a binary or source incompatible change against the newest 6.x release fails the build. Before 6.0.0 the API check only reports, because Kryo 6 changes the API of Kryo 5 on purpose.

⚠️ **GitHub.com Fallback** ⚠️