Skip to content

Commit a81080b

Browse files
committed
Add Java and Kotlin protobuf bindings
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.
1 parent 212ec4b commit a81080b

22 files changed

Lines changed: 50263 additions & 8 deletions

bindings/java/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target/

bindings/java/pom.xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.scip-code</groupId>
8+
<artifactId>scip-java</artifactId>
9+
<version>0.7.1</version>
10+
<packaging>jar</packaging>
11+
12+
<name>scip-java</name>
13+
<description>
14+
Generated Java bindings for the Semantic Code Intelligence Protocol (SCIP).
15+
</description>
16+
<url>https://github.com/scip-code/scip</url>
17+
18+
<licenses>
19+
<license>
20+
<name>Apache License, Version 2.0</name>
21+
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
22+
</license>
23+
</licenses>
24+
25+
<scm>
26+
<url>https://github.com/scip-code/scip</url>
27+
<connection>scm:git:https://github.com/scip-code/scip.git</connection>
28+
</scm>
29+
30+
<properties>
31+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
32+
<maven.compiler.source>11</maven.compiler.source>
33+
<maven.compiler.target>11</maven.compiler.target>
34+
<!--
35+
Must match the protoc version used for code generation (see flake.nix).
36+
The runtime is forwards/backwards compatible within a major version.
37+
-->
38+
<protobuf.version>4.32.1</protobuf.version>
39+
</properties>
40+
41+
<dependencies>
42+
<dependency>
43+
<groupId>com.google.protobuf</groupId>
44+
<artifactId>protobuf-java</artifactId>
45+
<version>${protobuf.version}</version>
46+
</dependency>
47+
</dependencies>
48+
</project>

0 commit comments

Comments
 (0)