Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centralize version declaration of jna, junit, protobuf #5285

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()}")
soloturn marked this conversation as resolved.
Show resolved Hide resolved
implementation("org.terasology:reflections:0.9.12-MB")

implementation("com.github.zafarkhaja:java-semver:0.10.2")
Expand Down
7 changes: 4 additions & 3 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()}")
soloturn marked this conversation as resolved.
Show resolved Hide resolved
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 All @@ -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")

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()}"
soloturn marked this conversation as resolved.
Show resolved Hide resolved
}
plugins {
}
Expand Down
8 changes: 4 additions & 4 deletions facades/PC/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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")
Expand Down
5 changes: 5 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
Loading