feat(jni): Maven distribution of the Java API on GitHub Packages - #618
Merged
Conversation
Publish app.opendocument:odr-core-java (Java classes only, plus sources and javadoc jars) to GitHub Packages on release. The native odr_jni library stays out of the artifact; consumers build it for their target platform. - jni/pom.xml: CI-friendly version via -Drevision, flattened POM - .github/workflows/maven.yml: verify on push, deploy on release (and workflow_dispatch for test publishes) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gffw8AurchbpS1rL3kWwBd
andiwand
enabled auto-merge (squash)
July 26, 2026 06:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
Stacked on #617.
Publishes the JNI Java API (
jni/java, packageapp.opendocument.core) as a Maven packageapp.opendocument:odr-core-javato GitHub Packages.Scope
Java classes only — the artifact deliberately contains no native binaries and no assets. Consumers (odr.droid) keep building
libodr_jnifor their target platform via their existing Conan/NDK machinery and add the Java API as a plain Gradle dependency.Changes
jni/pom.xml— Maven build ofjni/java(--release 17 -Xlint:all, kept in sync withCMAKE_JAVA_COMPILE_FLAGS); attaches sources + javadoc jars; CI-friendly versioning via-Drevisionwithflatten-maven-pluginso the deployed POM carries the resolved version;distributionManagementpoints at GitHub Packages..github/workflows/maven.yml—mvn verifyon push;mvn deployon published release (version from thev*tag, like the conan publish workflow) and onworkflow_dispatchwith an explicit version for test publishes. Uses the built-inGITHUB_TOKEN(packages: write) — no secrets to configure.jni/README.md— consumption snippet (GitHub Packages needs aread:packagestoken even for public packages).Verification
Local
mvn verifybuilds the jar + sources + javadoc jars cleanly (no javadoc/lint warnings); the flattened POM resolves the version placeholder.An end-to-end test publish can be done once this lands anywhere:
gh workflow run maven.yml --ref <branch> -f version=0.0.1-test1.https://claude.ai/code/session_01Gffw8AurchbpS1rL3kWwBd