Skip to content

Add Java and Kotlin protobuf bindings#398

Open
jupblb wants to merge 4 commits into
mainfrom
michal/bind-java
Open

Add Java and Kotlin protobuf bindings#398
jupblb wants to merge 4 commits into
mainfrom
michal/bind-java

Conversation

@jupblb
Copy link
Copy Markdown
Collaborator

@jupblb jupblb commented May 11, 2026

No description provided.

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.
@jupblb jupblb force-pushed the michal/bind-java branch from a81080b to 700a5cc Compare May 12, 2026 13:31
jupblb added 3 commits May 12, 2026 15:38
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).
@jupblb jupblb marked this pull request as ready for review May 12, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant