mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
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.
87 lines
3.0 KiB
Groovy
87 lines
3.0 KiB
Groovy
// Plugins
|
|
apply plugin: "java"
|
|
apply plugin: "jacoco"
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
|
|
wpilibTools.deps.wpilibVersion = wpilibVersion
|
|
|
|
|
|
dependencies {
|
|
implementation project(':photon-targeting')
|
|
|
|
implementation "io.javalin:javalin:$javalinVersion"
|
|
|
|
implementation 'org.msgpack:msgpack-core:0.9.0'
|
|
implementation 'org.msgpack:jackson-dataformat-msgpack:0.9.0'
|
|
|
|
implementation "org.wpilib.wpiutil:wpiutil-java:$wpilibVersion"
|
|
implementation "org.wpilib.datalog:datalog-java:$wpilibVersion"
|
|
implementation "org.wpilib.cameraserver:cameraserver-java:$wpilibVersion"
|
|
implementation "org.wpilib.cscore:cscore-java:$wpilibVersion"
|
|
implementation "org.wpilib.wpinet:wpinet-java:$wpilibVersion"
|
|
implementation "org.wpilib.wpimath:wpimath-java:$wpilibVersion"
|
|
implementation "org.wpilib.ntcore:ntcore-java:$wpilibVersion"
|
|
implementation "org.wpilib.hal:hal-java:$wpilibVersion"
|
|
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, openCVversion)
|
|
|
|
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: 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"
|
|
|
|
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'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
systemProperty("java.awt.headless", !project.hasProperty("enableTestUi"))
|
|
testLogging {
|
|
events "passed", "skipped", "failed", "standardOut", "standardError"
|
|
exceptionFormat = "full"
|
|
showStandardStreams = true
|
|
}
|
|
workingDir = new File("${rootDir}")
|
|
finalizedBy jacocoTestReport
|
|
}
|
|
|
|
jacoco {
|
|
toolVersion = "0.8.10"
|
|
reportsDirectory = layout.buildDirectory.dir('customJacocoReportDir')
|
|
}
|
|
|
|
jacocoTestReport {
|
|
dependsOn test
|
|
|
|
reports {
|
|
xml.required = true
|
|
csv.required = false
|
|
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
|
|
}
|
|
|
|
afterEvaluate {
|
|
classDirectories.setFrom(files(classDirectories.files.collect {
|
|
fileTree(dir: it,
|
|
exclude: "edu/wpi/**"
|
|
)
|
|
}))
|
|
}
|
|
}
|