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 c8dc2332f8f..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 @@ -73,7 +73,7 @@ dependencies { api("org.codehaus.plexus:plexus-utils:3.0.16") // Java magic - implementation("net.java.dev.jna:jna-platform:5.6.0") + implementation(libs.jna.platform) implementation("org.terasology:reflections:0.9.12-MB") implementation("com.esotericsoftware:reflectasm:1.11.9") @@ -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/facades/PC/build.gradle.kts b/facades/PC/build.gradle.kts index 79255a88a69..d5753c734e4 100644 --- a/facades/PC/build.gradle.kts +++ b/facades/PC/build.gradle.kts @@ -58,7 +58,7 @@ logger.info("PC VERSION: {}", version) group = "org.terasology.facades" dependencies { - implementation(group = "net.java.dev.jna", name = "jna-platform", version = "5.6.0") + implementation(libs.jna.platform) implementation(group = "info.picocli", name = "picocli", version = "4.5.2") annotationProcessor("info.picocli:picocli-codegen:4.5.2") @@ -82,9 +82,9 @@ dependencies { testImplementation(platform("org.junit:junit-bom:5.10.1")) { // junit-bom will set version numbers for the other org.junit dependencies. } - testImplementation("org.junit.jupiter:junit-jupiter-api") - testImplementation("org.junit.jupiter:junit-jupiter-params") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") + testImplementation(libs.junit.api) + testImplementation(libs.junit.params) + testRuntimeOnly(libs.junit.engine) testImplementation("com.google.truth:truth:1.1.2") testImplementation("com.google.truth.extensions:truth-java8-extension:1.1.2") diff --git a/settings.gradle.kts b/settings.gradle.kts index e6b43c2b73b..cbda39a3bc2 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -3,6 +3,8 @@ rootProject.name = "Terasology" dependencyResolutionManagement { versionCatalogs { create("libs") { + // currently not yet for build-logic, see https://github.com/gradle/gradle/issues/15383 , change verisons + // here and there please. val gestalt = version("gestalt", "8.0.0-SNAPSHOT") library("gestalt-core", "org.terasology.gestalt", "gestalt-asset-core" ).versionRef(gestalt) library("gestalt-entitysystem", "org.terasology.gestalt", "gestalt-entity-system" ).versionRef(gestalt) @@ -13,6 +15,7 @@ dependencyResolutionManagement { library("gestalt-util", "org.terasology.gestalt", "gestalt-util" ).versionRef(gestalt) library("gson", "com.google.code.gson:gson:2.8.6") library("guava", "com.google.guava:guava:31.1-jre") + library("jna-platform", "net.java.dev.jna:jna-platform:5.6.0") val junit5 = version("junit5", "5.10.1") library("junit-api", "org.junit.jupiter", "junit-jupiter-api").versionRef(junit5) library("junit-engine", "org.junit.jupiter", "junit-jupiter-engine").versionRef(junit5) @@ -22,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)