2021-01-14 21:45:26 -05:00
|
|
|
// Plugins
|
2021-01-18 22:12:57 -05:00
|
|
|
apply plugin: "java"
|
2023-10-25 20:27:56 -04:00
|
|
|
apply plugin: "jacoco"
|
2021-01-14 21:45:26 -05:00
|
|
|
|
2022-12-27 15:56:21 -05:00
|
|
|
java {
|
2024-10-20 20:23:50 -07:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
2022-12-27 15:56:21 -05:00
|
|
|
}
|
2021-01-14 21:45:26 -05:00
|
|
|
|
2023-11-22 20:08:23 -05:00
|
|
|
wpilibTools.deps.wpilibVersion = wpilibVersion
|
2022-12-16 17:05:23 -08:00
|
|
|
|
2023-11-22 20:08:23 -05:00
|
|
|
// 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);
|
|
|
|
|
wpi.getVersions().getWpimathVersion().convention(wpimathVersion);
|
2021-01-14 21:45:26 -05:00
|
|
|
|
2023-11-22 20:08:23 -05:00
|
|
|
dependencies {
|
|
|
|
|
implementation project(':photon-targeting')
|
2021-01-14 21:45:26 -05:00
|
|
|
|
2023-11-22 20:08:23 -05:00
|
|
|
implementation "io.javalin:javalin:$javalinVersion"
|
2023-10-25 20:27:56 -04:00
|
|
|
|
2023-11-22 20:08:23 -05:00
|
|
|
implementation 'org.msgpack:msgpack-core:0.9.0'
|
|
|
|
|
implementation 'org.msgpack:jackson-dataformat-msgpack:0.9.0'
|
2023-10-25 20:27:56 -04:00
|
|
|
|
2022-12-16 17:05:23 -08:00
|
|
|
implementation wpilibTools.deps.wpilibJava("wpiutil")
|
|
|
|
|
implementation wpilibTools.deps.wpilibJava("cameraserver")
|
|
|
|
|
implementation wpilibTools.deps.wpilibJava("cscore")
|
|
|
|
|
implementation wpilibTools.deps.wpilibJava("wpinet")
|
|
|
|
|
implementation wpilibTools.deps.wpilibJava("wpimath")
|
|
|
|
|
implementation wpilibTools.deps.wpilibJava("ntcore")
|
|
|
|
|
implementation wpilibTools.deps.wpilibJava("hal")
|
|
|
|
|
implementation wpilibTools.deps.wpilibJava("wpilibj")
|
2023-11-19 15:16:22 -05:00
|
|
|
implementation wpilibTools.deps.wpilibJava("apriltag")
|
2023-12-16 13:14:52 -05:00
|
|
|
implementation wpilibTools.deps.wpilibJava("wpiunits")
|
2024-10-31 02:59:39 -04:00
|
|
|
implementation wpilibTools.deps.wpilibOpenCvJava("frc" + openCVYear, wpi.versions.opencvVersion.get())
|
2022-12-16 17:05:23 -08:00
|
|
|
|
2023-10-25 20:27:56 -04:00
|
|
|
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: "org.ejml", name: "ejml-simple", version: wpi.versions.ejmlVersion.get()
|
|
|
|
|
implementation group: "us.hebi.quickbuf", name: "quickbuf-runtime", version: wpi.versions.quickbufVersion.get();
|
2021-01-14 21:45:26 -05:00
|
|
|
|
2023-11-22 20:08:23 -05:00
|
|
|
implementation "commons-io:commons-io:2.11.0"
|
|
|
|
|
implementation "commons-cli:commons-cli:1.5.0"
|
|
|
|
|
implementation "org.apache.commons:commons-exec:1.3"
|
2023-10-23 23:28:37 -04:00
|
|
|
|
2025-08-18 20:37:00 -07:00
|
|
|
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'
|
2021-01-14 21:45:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
test {
|
|
|
|
|
useJUnitPlatform()
|
2025-11-06 14:38:07 -05:00
|
|
|
systemProperty("java.awt.headless", !project.hasProperty("enableTestUi"))
|
2025-07-13 09:24:09 -04:00
|
|
|
testLogging {
|
|
|
|
|
events "passed", "skipped", "failed", "standardOut", "standardError"
|
2025-10-16 10:22:55 +08:00
|
|
|
exceptionFormat = "full"
|
2025-07-13 09:24:09 -04:00
|
|
|
showStandardStreams = true
|
|
|
|
|
}
|
2025-11-01 17:42:30 -04:00
|
|
|
workingDir = new File("${rootDir}")
|
2025-11-06 14:38:07 -05:00
|
|
|
finalizedBy jacocoTestReport
|
2021-01-14 21:45:26 -05:00
|
|
|
}
|
|
|
|
|
|
2023-10-15 12:17:40 -04:00
|
|
|
jacoco {
|
2023-11-19 15:16:22 -05:00
|
|
|
toolVersion = "0.8.10"
|
2023-10-15 12:17:40 -04:00
|
|
|
reportsDirectory = layout.buildDirectory.dir('customJacocoReportDir')
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-14 21:45:26 -05:00
|
|
|
jacocoTestReport {
|
2025-11-06 14:38:07 -05:00
|
|
|
dependsOn test
|
2021-01-14 21:45:26 -05:00
|
|
|
|
|
|
|
|
reports {
|
2023-10-15 12:17:40 -04:00
|
|
|
xml.required = true
|
|
|
|
|
csv.required = false
|
|
|
|
|
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
|
2021-01-14 21:45:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
afterEvaluate {
|
|
|
|
|
classDirectories.setFrom(files(classDirectories.files.collect {
|
|
|
|
|
fileTree(dir: it,
|
2023-10-24 23:02:59 -04:00
|
|
|
exclude: "edu/wpi/**"
|
2021-01-14 21:45:26 -05:00
|
|
|
)
|
|
|
|
|
}))
|
|
|
|
|
}
|
2021-01-17 14:57:21 -08:00
|
|
|
}
|