Skip to content

Commit

Permalink
Simplify application of wpilib versions
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta committed Nov 22, 2023
1 parent 6e39d85 commit 4563d61
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
12 changes: 4 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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('.') {
Expand Down
15 changes: 10 additions & 5 deletions shared/common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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"

Expand Down
5 changes: 3 additions & 2 deletions shared/config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4563d61

Please sign in to comment.