Skip to content

Commit

Permalink
centralize protobuf version
Browse files Browse the repository at this point in the history
Co-authored-by: BenjaminAmos <[email protected]>
  • Loading branch information
soloturn and BenjaminAmos committed Oct 23, 2024
1 parent 65f5319 commit 2211398
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion engine-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies {
// Dependency not provided for modules, but required for module-tests
implementation(libs.gson)
implementation("org.codehaus.plexus:plexus-utils:3.0.16")
implementation("com.google.protobuf:protobuf-java:3.16.1")
implementation("com.google.protobuf:protobuf-java:${libs.versions.protobuf.get().toString()}")
implementation("org.terasology:reflections:0.9.12-MB")

implementation("com.github.zafarkhaja:java-semver:0.10.2")
Expand Down
5 changes: 3 additions & 2 deletions engine/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies {
api(libs.gson)
api("net.sf.trove4j:trove4j:3.0.3")
implementation("io.netty:netty-all:4.1.77.Final")
implementation("com.google.protobuf:protobuf-java:3.22.0")
implementation("com.google.protobuf:protobuf-java:${libs.versions.protobuf.get().toString()}")
implementation("org.lz4:lz4-java:1.8.0")
implementation("org.apache.httpcomponents:httpclient:4.5.13")
// Javax for protobuf due to @Generated - needed on Java 9 or newer Javas
Expand Down Expand Up @@ -152,7 +152,8 @@ dependencies {

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.22.0"
// See https://github.com/google/protobuf-gradle-plugin/issues/563
artifact = "com.google.protobuf:protoc:${libs.versions.protobuf.get().toString()}"
}
plugins {
}
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ dependencyResolutionManagement {
library("mockito-core", "org.mockito", "mockito-core").versionRef(mockito)
library("mockito-inline", "org.mockito:mockito-inline:3.12.4")
library("mockito-junit", "org.mockito", "mockito-junit-jupiter").versionRef(mockito)
// protobuf does not work as the others, see https://github.com/google/protobuf-gradle-plugin/issues/563
val protobuf = version("protobuf", "3.22.5")
val slf4j = version("slf4j", "2.0.11")
library("slf4j-api", "org.slf4j", "slf4j-api").versionRef(slf4j)
library("slf4j-jul", "org.slf4j", "jul-to-slf4j").versionRef(slf4j)
Expand Down

0 comments on commit 2211398

Please sign in to comment.