mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-05 03:21:40 +00:00
Make 2027 build (#2422)
This PR updates everything for 2027. This includes removing GradleRIO, simplifying our wpilib version defintion, updating APIs, updating to Java 21, and more. Note that photonlibpy is failing because robotpy has not been fully updated yet. Examples are omitted because they need to be updated for our new PhotonPoseEstimator API and still need some changes from WPILIB. photonlib windows build is failing because we're waiting for some upstream changes. Finally, images are failing since they don't have Java 21 yet.
This commit is contained in:
@@ -3,16 +3,15 @@ apply plugin: "java"
|
||||
apply plugin: "jacoco"
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
dependencies {
|
||||
implementation project(':photon-targeting')
|
||||
@@ -33,14 +32,14 @@ dependencies {
|
||||
implementation "org.wpilib.wpilibj:wpilibj-java:$wpilibVersion"
|
||||
implementation "org.wpilib.apriltag:apriltag-java:$wpilibVersion"
|
||||
implementation "org.wpilib.wpiunits:wpiunits-java:$wpilibVersion"
|
||||
implementation wpilibTools.deps.wpilibOpenCvJava("frc" + openCVYear, wpi.versions.opencvVersion.get())
|
||||
implementation wpilibTools.deps.wpilibOpenCvJava("frc" + openCVYear, openCVversion)
|
||||
|
||||
implementation group: "com.fasterxml.jackson.core", name: "jackson-annotations", version: wpi.versions.jacksonVersion.get()
|
||||
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: "com.fasterxml.jackson.core", name: "jackson-annotations", version: jacksonVersion
|
||||
implementation group: "com.fasterxml.jackson.core", name: "jackson-core", version: jacksonVersion
|
||||
implementation group: "com.fasterxml.jackson.core", name: "jackson-databind", version: jacksonVersion
|
||||
|
||||
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 group: "org.ejml", name: "ejml-simple", version: ejmlVersion
|
||||
implementation group: "us.hebi.quickbuf", name: "quickbuf-runtime", version: quickbufVersion;
|
||||
|
||||
implementation "commons-io:commons-io:2.11.0"
|
||||
implementation "commons-cli:commons-cli:1.5.0"
|
||||
|
||||
@@ -4,8 +4,11 @@ apply plugin: 'jacoco'
|
||||
apply plugin: 'com.google.protobuf'
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
def baseArtifactId = nativeName
|
||||
@@ -126,7 +129,7 @@ test {
|
||||
finalizedBy jacocoTestReport
|
||||
}
|
||||
|
||||
wpilibTools.deps.wpilibVersion = wpi.versions.wpilibVersion.get()
|
||||
wpilibTools.deps.wpilibVersion = wpilibVersion
|
||||
|
||||
dependencies {
|
||||
if(project.hasProperty('includePhotonTargeting')) {
|
||||
@@ -144,19 +147,20 @@ dependencies {
|
||||
implementation "org.wpilib.wpilibj:wpilibj-java:$wpilibVersion"
|
||||
implementation "org.wpilib.apriltag:apriltag-java:$wpilibVersion"
|
||||
implementation "org.wpilib.wpiunits:wpiunits-java:$wpilibVersion"
|
||||
implementation wpilibTools.deps.wpilibOpenCvJava("frc" + openCVYear, wpi.versions.opencvVersion.get())
|
||||
implementation wpilibTools.deps.wpilibOpenCvJava("frc" + openCVYear, openCVversion)
|
||||
|
||||
implementation group: "com.fasterxml.jackson.core", name: "jackson-annotations", version: wpi.versions.jacksonVersion.get()
|
||||
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: "com.fasterxml.jackson.core", name: "jackson-annotations", version: jacksonVersion
|
||||
implementation group: "com.fasterxml.jackson.core", name: "jackson-core", version: jacksonVersion
|
||||
implementation group: "com.fasterxml.jackson.core", name: "jackson-databind", version: jacksonVersion
|
||||
|
||||
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 group: "org.ejml", name: "ejml-simple", version: ejmlVersion
|
||||
implementation group: "us.hebi.quickbuf", name: "quickbuf-runtime", version: quickbufVersion;
|
||||
|
||||
testImplementation(platform('org.junit:junit-bom:5.11.4'))
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-params'
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||
}
|
||||
|
||||
jacoco {
|
||||
|
||||
Reference in New Issue
Block a user