[build] Migrate to Gradle version catalogs (#8524)

Also fixes the google compile-testing library to 0.23.0 (the latest
available at time of writing) instead of a wildcard

Jackson versions were inconsistent across projects; most were on 2.19.2,
but the fields subproject was on 2.15.2. All projects are now on 2.19.2
for consistency
This commit is contained in:
Sam Carlberg
2026-02-20 18:31:33 -05:00
committed by GitHub
parent 8f9fc4d1b6
commit 793b0a3187
18 changed files with 102 additions and 44 deletions

View File

@@ -1,5 +1,3 @@
import org.gradle.internal.os.OperatingSystem
nativeUtils.skipInstallPdb = project.hasProperty('buildServer')
if (project.hasProperty('ciDebugOnly')) {
@@ -12,8 +10,8 @@ nativeUtils.withCrossSystemCore()
nativeUtils {
wpi {
configureDependencies {
opencvYear = "frc2025"
opencvVersion = "4.10.0-3"
opencvYear = libs.versions.thirdparty.year
opencvVersion = libs.versions.opencv
}
}
}

View File

@@ -121,8 +121,8 @@ tasks.withType(JavaCompile).configureEach {
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation libs.junit.api
testRuntimeOnly libs.junit.launcher
devImplementation sourceSets.main.output
}

View File

@@ -1,5 +1,3 @@
def opencvVersion = '4.10.0-3'
if (project.hasProperty('useCpp') && project.useCpp) {
model {
binaries {
@@ -22,12 +20,12 @@ if (project.hasProperty('useCpp') && project.useCpp) {
if (project.hasProperty('useJava') && project.useJava) {
dependencies {
implementation "edu.wpi.first.thirdparty.frc2025.opencv:opencv-java:${opencvVersion}"
implementation libs.thirdparty.opencv
if (!project.hasProperty('skipDev') || !project.skipDev) {
devImplementation "edu.wpi.first.thirdparty.frc2025.opencv:opencv-java:${opencvVersion}"
devImplementation libs.thirdparty.opencv
}
if (project.hasProperty('useDocumentation') && project.useDocumentation) {
javaSource "edu.wpi.first.thirdparty.frc2025.opencv:opencv-java:${opencvVersion}:sources"
javaSource(variantOf(libs.thirdparty.opencv) { classifier("sources") })
}
}
}