From 4563d611dead69ab83ebbad441ef790abe707354 Mon Sep 17 00:00:00 2001 From: Sriman Achanta <68172138+srimanachanta@users.noreply.github.com> Date: Wed, 22 Nov 2023 13:23:34 -0500 Subject: [PATCH] Simplify application of wpilib versions --- build.gradle | 12 ++++-------- shared/common.gradle | 15 ++++++++++----- shared/config.gradle | 5 +++-- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index c0792d03f2..f772c89e32 100644 --- a/build.gradle +++ b/build.gradle @@ -21,6 +21,7 @@ apply from: "versioningHelper.gradle" ext { wpilibVersion = "2024.1.1-beta-3" + wpimathVersion = wpilibVersion openCVversion = "4.8.0-2" joglVersion = "2.4.0-rc-20200307" javalinVersion = "5.6.2" @@ -36,16 +37,11 @@ ext { if (nativeName == "macx64") nativeName = "osxx86-64"; if (nativeName == "macarm64") nativeName = "osxarm64"; jniPlatform = nativeName - println("Building for platform " + jniPlatform) + println("Building for platform: " + jniPlatform) + println("Using Wpilib: " + wpilibVersion) + println("Using OpenCV: " + openCVversion) } -wpilibTools.deps.wpilibVersion = wpilibVersion - -// Tell gradlerio what version of things to use (that we care about) -// See: https://github.com/wpilibsuite/GradleRIO/blob/main/src/main/java/edu/wpi/first/gradlerio/wpi/WPIVersionsExtension.java -wpi.getVersions().getOpencvVersion().convention(openCVversion); -wpi.getVersions().getWpilibVersion().convention(wpilibVersion); - spotless { java { target fileTree('.') { diff --git a/shared/common.gradle b/shared/common.gradle index 24244488b7..faeaa1f694 100644 --- a/shared/common.gradle +++ b/shared/common.gradle @@ -7,7 +7,13 @@ java { targetCompatibility = JavaVersion.VERSION_11 } -wpilibTools.deps.wpilibVersion = wpi.versions.wpilibVersion.get() +wpilibTools.deps.wpilibVersion = wpilibVersion + +// Tell gradlerio what version of things to use (that we care about) +// See: https://github.com/wpilibsuite/GradleRIO/blob/main/src/main/java/edu/wpi/first/gradlerio/wpi/WPIVersionsExtension.java +wpi.getVersions().getOpencvVersion().convention(openCVversion); +wpi.getVersions().getWpilibVersion().convention(wpilibVersion); +wpi.getVersions().getWpimathVersion().convention(wpimathVersion); dependencies { implementation project(':photon-targeting') @@ -32,13 +38,12 @@ dependencies { implementation group: "com.fasterxml.jackson.core", name: "jackson-core", version: wpi.versions.jacksonVersion.get() implementation group: "com.fasterxml.jackson.core", name: "jackson-databind", version: wpi.versions.jacksonVersion.get() - implementation group: "org.apache.commons", name: "commons-lang3", version: "3.12.0" - implementation group: "commons-io", name: "commons-io", version: "2.11.0" - implementation group: "commons-cli", name: "commons-cli", version: "1.5.0" - implementation group: "org.ejml", name: "ejml-simple", version: wpi.versions.ejmlVersion.get() implementation group: "us.hebi.quickbuf", name: "quickbuf-runtime", version: wpi.versions.quickbufVersion.get(); + implementation "commons-io:commons-io:2.11.0" + implementation "commons-cli:commons-cli:1.5.0" + implementation "org.apache.commons:commons-lang3:3.12.0" implementation "org.apache.commons:commons-collections4:4.4" implementation "org.apache.commons:commons-exec:1.3" diff --git a/shared/config.gradle b/shared/config.gradle index 43300e26cc..b3c7781c84 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -9,11 +9,12 @@ nativeUtils.withCrossLinuxArm64() // Configure WPI dependencies. nativeUtils.wpi.configureDependencies { wpiVersion = wpilibVersion + wpimathVersion = wpimathVersion opencvYear = 'frc2024' opencvVersion = openCVversion - googleTestYear = "frc2023" + googleTestYear = "frc2024" + googleTestVersion = "1.14.0-1" niLibVersion = "2024.1.1" - googleTestVersion = "1.12.1-2" } // Configure warnings and errors