Add Java and Kotlin protobuf bindings#398
Open
jupblb wants to merge 4 commits into
Open
Conversation
Adds two new bindings under bindings/java and bindings/kotlin, generated
by protoc's built-in --java_out and --kotlin_out plugins (no extra
plugin packages required beyond pkgs.protobuf).
* buf.gen.yaml is migrated to v2 syntax, which lets us use
protoc_builtin: java/kotlin. Existing v1 entries are converted to
the equivalent local: <binary> form.
* flake.nix gains pkgs.protobuf in proto-generate.runtimeInputs so
protoc is on PATH for the built-in generators.
* checks.nix gains java-bindings and kotlin-bindings checks built via
pkgs.maven.buildMavenPackage, plus a small extractPomVersion helper
that asserts pom.xml versions match the project version (matching
the pattern used for rust/haskell/typescript bindings).
* Each binding ships its own pom.xml so consumers can mvn install /
publish independently. The Kotlin DSL extensions reference the
underlying Java message classes, so the Java sources are also
generated into bindings/kotlin/src/main/java to keep that module
self-contained for the in-tree Maven build.
* The new checks are picked up automatically by .github/workflows/
nix-checks.yaml since it auto-discovers checks via builtins.attrNames.
The previous [^<]+ pattern accepted any non-< character, including whitespace and unrelated text. Restrict it to digits + dots, matching the semantic-version style we use across all bindings (and the project's cmd/scip/version.txt). This will fail loudly if a non-numeric version suffix ever sneaks into a pom.xml.
Adds bindings/java/pom.xml and bindings/kotlin/pom.xml as trigger paths
and includes checks.x86_64-linux.{java,kotlin}-bindings in the
nix-update loop so that Renovate-driven dependency bumps (e.g.
protobuf-java, protobuf-kotlin, kotlin-stdlib) get their mvnHash
recomputed and pushed back to the PR automatically, matching the
existing handling for the Go and TypeScript bindings.
nix-update natively supports updating mvnHash on
pkgs.maven.buildMavenPackage derivations, and a local dry-run against
both new attributes is idempotent against the currently-committed
hashes.
Maven Central requires the groupId to follow reverse-DNS notation of a domain you control. The project owns scip-code.org, so the correct namespace is org.scip-code (not com.scip-code, which I picked arbitrarily in the initial commit and which would not be verifiable).
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.
No description provided.