Skip to content

Commit

Permalink
Bump versions to 2024 per vendor template
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Oct 14, 2023
1 parent 8b9a198 commit fdc4bb9
Show file tree
Hide file tree
Showing 20 changed files with 79 additions and 64 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
16 changes: 10 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -61,3 +61,7 @@ spotless {
targetExclude("photon-lib/src/main/java/org/photonvision/PhotonVersion.java")
}
}

wrapper {
gradleVersion '8.3'
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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##*/}
Expand Down
2 changes: 1 addition & 1 deletion photon-core/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions photon-lib/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"

Expand Down
16 changes: 8 additions & 8 deletions photon-lib/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 '/'
Expand All @@ -67,7 +67,7 @@ task cppHeadersZip(type: Zip) {
task cppSourcesZip(type: Zip) {
destinationDirectory = outputsFolder
archiveBaseName = zipBaseName
classifier = "sources"
archiveClassifier = "sources"

from(licenseFile) {
into '/'
Expand All @@ -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
}

Expand All @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion photon-server/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 2 additions & 1 deletion photonlib-cpp-examples/aimandrange/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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##*/}
Expand Down
3 changes: 2 additions & 1 deletion photonlib-cpp-examples/aimattarget/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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##*/}
Expand Down
3 changes: 2 additions & 1 deletion photonlib-cpp-examples/apriltagExample/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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##*/}
Expand Down
3 changes: 2 additions & 1 deletion photonlib-cpp-examples/getinrange/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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##*/}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion photonlib-cpp-examples/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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##*/}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion photonlib-java-examples/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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##*/}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion photonlib-java-examples/swervedriveposeestsim/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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##*/}
Expand Down
30 changes: 15 additions & 15 deletions shared/common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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/**"
// // )
// // }))
// // }
// }
10 changes: 6 additions & 4 deletions shared/config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down Expand Up @@ -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'

Expand Down Expand Up @@ -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
}
}
Expand Down

0 comments on commit fdc4bb9

Please sign in to comment.