mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
We now need platform specific jars -- reworks actions to support that. Currently only generates 32 bit pi images.
82 lines
2.5 KiB
Groovy
82 lines
2.5 KiB
Groovy
import java.nio.file.Path
|
|
import java.time.LocalDateTime
|
|
import java.time.format.DateTimeFormatter
|
|
|
|
// Plugins
|
|
apply plugin: "jacoco"
|
|
apply plugin: "java"
|
|
|
|
sourceCompatibility = 11
|
|
|
|
wpilibTools.deps.wpilibVersion = wpilibVersion
|
|
|
|
dependencies {
|
|
// Jackson
|
|
implementation "com.fasterxml.jackson.core:jackson-annotations:2.12.4"
|
|
implementation "com.fasterxml.jackson.core:jackson-core:2.12.4"
|
|
implementation "com.fasterxml.jackson.core:jackson-databind:2.12.4"
|
|
|
|
// Apache commons
|
|
implementation group: "org.apache.commons", name: "commons-lang3", version: "3.12.0"
|
|
implementation group: "commons-io", name: "commons-io", version: "2.11.0"
|
|
implementation group: "commons-cli", name: "commons-cli", version: "1.5.0"
|
|
implementation "org.apache.commons:commons-collections4:4.4"
|
|
implementation "org.apache.commons:commons-exec:1.3"
|
|
|
|
// WPILib deps
|
|
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")
|
|
|
|
implementation "edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:$opencvVersion"
|
|
jniPlatforms.each { implementation "edu.wpi.first.thirdparty.frc2023.opencv:opencv-jni:$opencvVersion:$it" }
|
|
|
|
implementation "org.ejml:ejml-simple:0.41"
|
|
|
|
// test stuff
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events "passed", "skipped", "failed", "standardOut", "standardError"
|
|
}
|
|
workingDir = new File("${rootDir}")
|
|
}
|
|
|
|
task testHeadless(type: Test) {
|
|
group = "verification"
|
|
systemProperty("java.awt.headless", "true")
|
|
useJUnitPlatform()
|
|
exclude '**/*BenchmarkTest*'
|
|
workingDir = "../"
|
|
}
|
|
|
|
task generateJavaDocs(type: Javadoc) {
|
|
source = sourceSets.main.allJava
|
|
classpath = sourceSets.main.compileClasspath
|
|
destinationDir = file("${projectDir}/build/docs")
|
|
}
|
|
|
|
jacocoTestReport {
|
|
// dependsOn testHeadless // Tests are required to run before generating the report
|
|
|
|
reports {
|
|
xml.enabled true
|
|
}
|
|
|
|
afterEvaluate {
|
|
classDirectories.setFrom(files(classDirectories.files.collect {
|
|
fileTree(dir: it,
|
|
exclude: "edu/wpi/**"
|
|
)
|
|
}))
|
|
}
|
|
}
|