From c8e4a0b75ce7ab446396c46b68bde1dae57ff87c Mon Sep 17 00:00:00 2001 From: Matthew Morley Date: Sun, 15 Oct 2023 11:59:02 -0400 Subject: [PATCH] Copy frc year from build.gradle --- build.gradle | 2 ++ photon-lib/build.gradle | 4 +++- photon-lib/src/generate/photonlib.json.in | 2 +- shared/config.gradle | 5 +++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index d3657b972f..199729e75a 100644 --- a/build.gradle +++ b/build.gradle @@ -30,6 +30,8 @@ ext { openCVversion = "4.8.0-1" joglVersion = "2.4.0-rc-20200307" javalinVersion = "5.6.2" + frcYear = "2024" + pubVersion = versionString isDev = pubVersion.startsWith("dev") diff --git a/photon-lib/build.gradle b/photon-lib/build.gradle index fa2e1d6e95..d7952394df 100644 --- a/photon-lib/build.gradle +++ b/photon-lib/build.gradle @@ -126,7 +126,9 @@ task generateVendorJson() { if (photonlibFileOutput.exists()) { photonlibFileOutput.delete() } - def read = photonlibFileInput.text.replace('${photon_version}', pubVersion) + def read = photonlibFileInput.text + .replace('${photon_version}', pubVersion) + .replace('${frc_year}', frcYear) photonlibFileOutput.write(read) } diff --git a/photon-lib/src/generate/photonlib.json.in b/photon-lib/src/generate/photonlib.json.in index 164d3228c5..9b8f63aaa4 100644 --- a/photon-lib/src/generate/photonlib.json.in +++ b/photon-lib/src/generate/photonlib.json.in @@ -3,7 +3,7 @@ "name": "photonlib", "version": "${photon_version}", "uuid": "515fe07e-bfc6-11fa-b3de-0242ac130004", - "frcYear": "2024", + "frcYear": "${frc_year}", "mavenUrls": [ "https://maven.photonvision.org/repository/internal", "https://maven.photonvision.org/repository/snapshots" diff --git a/shared/config.gradle b/shared/config.gradle index 013a7052be..3d5f91b150 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -6,12 +6,13 @@ nativeUtils.withCrossLinuxArm64() // Configure WPI dependencies. nativeUtils.wpi.configureDependencies { + opencvYear = 'frc2024' + googleTestYear = "frc2023" + wpiVersion = wpilibVersion wpimathVersion = wpilibVersion niLibVersion = "2024.1.1" - opencvYear = 'frc2024' opencvVersion = openCVversion - googleTestYear = "frc2023" googleTestVersion = "1.12.1-2" imguiVersion = "1.86-1" }