Skip to content

Commit

Permalink
Copy frc year from build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Oct 15, 2023
1 parent df442d6 commit c8e4a0b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
4 changes: 3 additions & 1 deletion photon-lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion photon-lib/src/generate/photonlib.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions shared/config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit c8e4a0b

Please sign in to comment.