diff --git a/engine-tests/build.gradle.kts b/engine-tests/build.gradle.kts index 9f5c07f0451..a5a4af27a20 100644 --- a/engine-tests/build.gradle.kts +++ b/engine-tests/build.gradle.kts @@ -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") diff --git a/engine/build.gradle.kts b/engine/build.gradle.kts index 8617b5772d8..dd67520d26a 100644 --- a/engine/build.gradle.kts +++ b/engine/build.gradle.kts @@ -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 @@ -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 { } diff --git a/settings.gradle.kts b/settings.gradle.kts index 5f1f8f2cb52..cbda39a3bc2 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -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)