From fdc4bb9c7058e44121ae1933f1ee78848140275d Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 14 Oct 2023 08:09:12 -0400 Subject: [PATCH] Bump versions to 2024 per vendor template --- .github/workflows/main.yml | 29 +++++++++--------- build.gradle | 16 ++++++---- gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 3 +- photon-core/build.gradle | 2 +- photon-lib/build.gradle | 6 ++-- photon-lib/publish.gradle | 16 +++++----- photon-server/build.gradle | 2 +- photonlib-cpp-examples/aimandrange/gradlew | 3 +- photonlib-cpp-examples/aimattarget/gradlew | 3 +- .../apriltagExample/gradlew | 3 +- photonlib-cpp-examples/getinrange/gradlew | 3 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- photonlib-cpp-examples/gradlew | 3 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- photonlib-java-examples/gradlew | 3 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../swervedriveposeestsim/gradlew | 3 +- shared/common.gradle | 30 +++++++++---------- shared/config.gradle | 10 ++++--- 20 files changed, 79 insertions(+), 64 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e2c3d773cc..2c38bed562 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -146,20 +146,20 @@ jobs: - name: Gradle Tests run: ./gradlew testHeadless -i --max-workers 1 --stacktrace - # Generate Coverage Report. - - name: Gradle Coverage - run: ./gradlew jacocoTestReport --max-workers 1 - - # Publish Coverage Report. - - name: Publish Server Coverage Report - uses: codecov/codecov-action@v3 - with: - file: ./photon-server/build/reports/jacoco/test/jacocoTestReport.xml - - - name: Publish Core Coverage Report - uses: codecov/codecov-action@v3 - with: - file: ./photon-core/build/reports/jacoco/test/jacocoTestReport.xml + # # Generate Coverage Report. + # - name: Gradle Coverage + # run: ./gradlew jacocoTestReport --max-workers 1 + + # # Publish Coverage Report. + # - name: Publish Server Coverage Report + # uses: codecov/codecov-action@v3 + # with: + # file: ./photon-server/build/reports/jacoco/test/jacocoTestReport.xml + + # - name: Publish Core Coverage Report + # uses: codecov/codecov-action@v3 + # with: + # file: ./photon-core/build/reports/jacoco/test/jacocoTestReport.xml photonserver-build-offline-docs: runs-on: ubuntu-22.04 @@ -225,6 +225,7 @@ jobs: include: - os: windows-2022 artifact-name: Win64 + architecture: x64 # Mac builds are broken due to opencv class loading issues -- disable for now # - os: macos-11 # artifact-name: macOS diff --git a/build.gradle b/build.gradle index cbe84c5549..d3657b972f 100644 --- a/build.gradle +++ b/build.gradle @@ -2,12 +2,12 @@ plugins { id "com.diffplug.spotless" version "6.19.0" id "com.github.johnrengelman.shadow" version "7.1.2" id "com.github.node-gradle.node" version "3.1.1" apply false - id "edu.wpi.first.GradleJni" version "1.0.0" - id "edu.wpi.first.GradleVsCode" version "1.1.0" - id "edu.wpi.first.NativeUtils" version "2023.11.1" apply false + id "edu.wpi.first.GradleJni" version "1.1.0" + id "edu.wpi.first.GradleVsCode" version "1.3.0" + id "edu.wpi.first.NativeUtils" version "2024.2.0" apply false id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2" id "org.hidetake.ssh" version "2.10.1" - id 'edu.wpi.first.WpilibTools' version '1.0.0' + id 'edu.wpi.first.WpilibTools' version '1.1.0' } import org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency; @@ -26,8 +26,8 @@ allprojects { apply from: "versioningHelper.gradle" ext { - wpilibVersion = "2023.4.2" - opencvVersion = "4.6.0-4" + wpilibVersion = "2024.1.1-beta-1" + openCVversion = "4.8.0-1" joglVersion = "2.4.0-rc-20200307" javalinVersion = "5.6.2" pubVersion = versionString @@ -61,3 +61,7 @@ spotless { targetExclude("photon-lib/src/main/java/org/photonvision/PhotonVersion.java") } } + +wrapper { + gradleVersion '8.3' +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae04661ee7..7f959b087a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services\.gradle\.org/distributions/gradle-8\.3-bin\.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 8bedea1ac8..89a57c4dfe 100755 --- a/gradlew +++ b/gradlew @@ -36,7 +36,8 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_NAME="Gradle" APP_BASE_NAME=${0##*/} diff --git a/photon-core/build.gradle b/photon-core/build.gradle index dc805fff55..5ebef599a4 100644 --- a/photon-core/build.gradle +++ b/photon-core/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'edu.wpi.first.WpilibTools' version '1.0.0' + id 'edu.wpi.first.WpilibTools' version '1.1.0' } import java.nio.file.Path diff --git a/photon-lib/build.gradle b/photon-lib/build.gradle index 1536e9b0d6..d8fba46539 100644 --- a/photon-lib/build.gradle +++ b/photon-lib/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'edu.wpi.first.WpilibTools' version '1.0.0' + id 'edu.wpi.first.WpilibTools' version '1.1.0' } import java.nio.file.Path @@ -50,8 +50,8 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-core:2.12.4" implementation "com.fasterxml.jackson.core:jackson-databind:2.12.4" - implementation "edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:$opencvVersion" - implementation "edu.wpi.first.thirdparty.frc2023.opencv:opencv-jni:$opencvVersion:$jniPlatform" + implementation "edu.wpi.first.thirdparty.frc2024.opencv:opencv-java:$openCVversion" + implementation "edu.wpi.first.thirdparty.frc2024.opencv:opencv-jni:$openCVversion:$jniPlatform" implementation "org.ejml:ejml-simple:0.41" diff --git a/photon-lib/publish.gradle b/photon-lib/publish.gradle index 725d47c0e5..aeb62582be 100644 --- a/photon-lib/publish.gradle +++ b/photon-lib/publish.gradle @@ -37,8 +37,8 @@ copyAllOutputs.dependsOn outputVersions ext.addTaskToCopyAllOutputs = { task -> copyAllOutputs.dependsOn task - copyAllOutputs.inputs.file task.archivePath - copyAllOutputs.from task.archivePath + copyAllOutputs.inputs.file task.archiveFile + copyAllOutputs.from task.archiveFile } def artifactGroupId = 'org.photonvision' @@ -49,7 +49,7 @@ def javaBaseName = "_GROUP_org_photonvision_photonlib_ID_${baseArtifactId}-java_ task cppHeadersZip(type: Zip) { destinationDirectory = outputsFolder archiveBaseName = zipBaseName - classifier = "headers" + archiveClassifier = "headers" from(licenseFile) { into '/' @@ -67,7 +67,7 @@ task cppHeadersZip(type: Zip) { task cppSourcesZip(type: Zip) { destinationDirectory = outputsFolder archiveBaseName = zipBaseName - classifier = "sources" + archiveClassifier = "sources" from(licenseFile) { into '/' @@ -84,12 +84,12 @@ build.dependsOn cppSourcesZip addTaskToCopyAllOutputs(cppSourcesZip) task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' + archiveClassifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' from javadoc.destinationDir } @@ -102,14 +102,14 @@ task outputJar(type: Jar, dependsOn: classes) { task outputSourcesJar(type: Jar, dependsOn: classes) { archiveBaseName = javaBaseName destinationDirectory = outputsFolder - classifier = 'sources' + archiveClassifier = 'sources' from sourceSets.main.allSource } task outputJavadocJar(type: Jar, dependsOn: javadoc) { archiveBaseName = javaBaseName destinationDirectory = outputsFolder - classifier = 'javadoc' + archiveClassifier = 'javadoc' from javadoc.destinationDir } diff --git a/photon-server/build.gradle b/photon-server/build.gradle index a37e4f3ea0..92b50a81b8 100644 --- a/photon-server/build.gradle +++ b/photon-server/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'edu.wpi.first.WpilibTools' version '1.0.0' + id 'edu.wpi.first.WpilibTools' version '1.1.0' } apply plugin: "application" diff --git a/photonlib-cpp-examples/aimandrange/gradlew b/photonlib-cpp-examples/aimandrange/gradlew index a69d9cb6c2..0ef4c1e860 100755 --- a/photonlib-cpp-examples/aimandrange/gradlew +++ b/photonlib-cpp-examples/aimandrange/gradlew @@ -80,7 +80,8 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_NAME="Gradle" APP_BASE_NAME=${0##*/} diff --git a/photonlib-cpp-examples/aimattarget/gradlew b/photonlib-cpp-examples/aimattarget/gradlew index a69d9cb6c2..0ef4c1e860 100755 --- a/photonlib-cpp-examples/aimattarget/gradlew +++ b/photonlib-cpp-examples/aimattarget/gradlew @@ -80,7 +80,8 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_NAME="Gradle" APP_BASE_NAME=${0##*/} diff --git a/photonlib-cpp-examples/apriltagExample/gradlew b/photonlib-cpp-examples/apriltagExample/gradlew index a69d9cb6c2..0ef4c1e860 100644 --- a/photonlib-cpp-examples/apriltagExample/gradlew +++ b/photonlib-cpp-examples/apriltagExample/gradlew @@ -80,7 +80,8 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_NAME="Gradle" APP_BASE_NAME=${0##*/} diff --git a/photonlib-cpp-examples/getinrange/gradlew b/photonlib-cpp-examples/getinrange/gradlew index a69d9cb6c2..0ef4c1e860 100755 --- a/photonlib-cpp-examples/getinrange/gradlew +++ b/photonlib-cpp-examples/getinrange/gradlew @@ -80,7 +80,8 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_NAME="Gradle" APP_BASE_NAME=${0##*/} diff --git a/photonlib-cpp-examples/gradle/wrapper/gradle-wrapper.properties b/photonlib-cpp-examples/gradle/wrapper/gradle-wrapper.properties index ae04661ee7..7f959b087a 100644 --- a/photonlib-cpp-examples/gradle/wrapper/gradle-wrapper.properties +++ b/photonlib-cpp-examples/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services\.gradle\.org/distributions/gradle-8\.3-bin\.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/photonlib-cpp-examples/gradlew b/photonlib-cpp-examples/gradlew index 8bedea1ac8..89a57c4dfe 100755 --- a/photonlib-cpp-examples/gradlew +++ b/photonlib-cpp-examples/gradlew @@ -36,7 +36,8 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_NAME="Gradle" APP_BASE_NAME=${0##*/} diff --git a/photonlib-java-examples/gradle/wrapper/gradle-wrapper.properties b/photonlib-java-examples/gradle/wrapper/gradle-wrapper.properties index ae04661ee7..7f959b087a 100644 --- a/photonlib-java-examples/gradle/wrapper/gradle-wrapper.properties +++ b/photonlib-java-examples/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services\.gradle\.org/distributions/gradle-8\.3-bin\.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/photonlib-java-examples/gradlew b/photonlib-java-examples/gradlew index 8bedea1ac8..89a57c4dfe 100755 --- a/photonlib-java-examples/gradlew +++ b/photonlib-java-examples/gradlew @@ -36,7 +36,8 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_NAME="Gradle" APP_BASE_NAME=${0##*/} diff --git a/photonlib-java-examples/swervedriveposeestsim/gradle/wrapper/gradle-wrapper.properties b/photonlib-java-examples/swervedriveposeestsim/gradle/wrapper/gradle-wrapper.properties index c23a1b3177..d3fb630184 100644 --- a/photonlib-java-examples/swervedriveposeestsim/gradle/wrapper/gradle-wrapper.properties +++ b/photonlib-java-examples/swervedriveposeestsim/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=permwrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services\.gradle\.org/distributions/gradle-8\.3-bin\.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=permwrapper/dists diff --git a/photonlib-java-examples/swervedriveposeestsim/gradlew b/photonlib-java-examples/swervedriveposeestsim/gradlew index a69d9cb6c2..0ef4c1e860 100644 --- a/photonlib-java-examples/swervedriveposeestsim/gradlew +++ b/photonlib-java-examples/swervedriveposeestsim/gradlew @@ -80,7 +80,8 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_NAME="Gradle" APP_BASE_NAME=${0##*/} diff --git a/shared/common.gradle b/shared/common.gradle index 684cf24bf9..2ceae9422b 100644 --- a/shared/common.gradle +++ b/shared/common.gradle @@ -36,8 +36,8 @@ dependencies { implementation wpilibTools.deps.wpilibJava("hal") implementation wpilibTools.deps.wpilibJava("wpilibj") - implementation "edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:$opencvVersion" - implementation "edu.wpi.first.thirdparty.frc2023.opencv:opencv-jni:$opencvVersion:$jniPlatform" + implementation "edu.wpi.first.thirdparty.frc2024.opencv:opencv-java:$openCVversion" + implementation "edu.wpi.first.thirdparty.frc2024.opencv:opencv-jni:$openCVversion:$jniPlatform" implementation "org.ejml:ejml-simple:0.41" @@ -67,18 +67,18 @@ task generateJavaDocs(type: Javadoc) { destinationDir = file("${projectDir}/build/docs") } -jacocoTestReport { -// dependsOn testHeadless // Tests are required to run before generating the report +// jacocoTestReport { +// // dependsOn testHeadless // Tests are required to run before generating the report - reports { - xml.enabled true - } +// reports { +// xml.enabled false +// } - afterEvaluate { - classDirectories.setFrom(files(classDirectories.files.collect { - fileTree(dir: it, - exclude: "edu/wpi/**" - ) - })) - } -} +// // afterEvaluate { +// // classDirectories.setFrom(files(classDirectories.files.collect { +// // fileTree(dir: it, +// // exclude: "edu/wpi/**" +// // ) +// // })) +// // } +// } diff --git a/shared/config.gradle b/shared/config.gradle index 104faaec04..58c136b360 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -9,8 +9,10 @@ nativeUtils.wpi.configureDependencies { wpiVersion = wpilibVersion wpimathVersion = wpilibVersion niLibVersion = "2023.3.0" - opencvVersion = "4.6.0-4" - googleTestVersion = "1.12.1-1" + opencvYear = 'frc2024' + opencvVersion = openCVversion + googleTestYear = "frc2023" + googleTestVersion = "1.12.1-2" imguiVersion = "1.86-1" } @@ -91,7 +93,7 @@ ext.createComponentZipTasks = { components, names, base, type, project, func -> def task = project.tasks.create(base + "-${key}", type) { description = 'Creates component archive for platform ' + key destinationDirectory = outputsFolder - classifier = key + archiveClassifier = key archiveBaseName = '_M_' + base duplicatesStrategy = 'exclude' @@ -125,7 +127,7 @@ ext.createAllCombined = { list, name, base, type, project -> list.each { if (it.name.endsWith('debug')) return - from project.zipTree(it.archivePath) + from project.zipTree(it.archiveFile) dependsOn it } }