Skip to content

Commit 325989b

Browse files
committed
chore: Match the protoc version w/ the protobuf in the gradle build
Not specifying a protoc binary like this means it uses what's installed on the system. This works fine if you're building via the docker setup, but isn't very convenient if you're working from e.g. inside Android Studio.
1 parent fe2f38e commit 325989b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docker/jvm.Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ COPY gradlew gradle.properties settings.gradle.kts /work/jvm-toxcore-c/
4040
COPY gradle /work/jvm-toxcore-c/gradle/
4141
COPY lib/ /work/jvm-toxcore-c/lib/
4242
ENV LD_LIBRARY_PATH=/work/jvm-toxcore-c/_install/host/lib
43-
ENV PATH=/work/jvm-toxcore-c/_install/host/bin:$PATH
4443
RUN ./gradlew build
4544

4645
RUN javac -h . -cp /work/jvm-toxcore-c/lib/build/classes/kotlin/main:/work/jvm-toxcore-c/lib/build/classes/java/main \

lib/build.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,19 @@ repositories {
1111
mavenCentral()
1212
}
1313

14+
val protobufVersion = "3.24.4"
15+
1416
dependencies {
15-
implementation("com.google.protobuf:protobuf-java:3.24.4")
17+
implementation("com.google.protobuf:protobuf-java:$protobufVersion")
1618
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
1719
}
1820

21+
protobuf {
22+
protoc {
23+
artifact = "com.google.protobuf:protoc:$protobufVersion"
24+
}
25+
}
26+
1927
testing {
2028
suites {
2129
// Configure the built-in test suite

0 commit comments

Comments
 (0)