Files
PhotonVision/shared/common.gradle
Tyler Veness a161bd5be9 Upgrade all maven dependencies for 2022 (#377)
This also fixes compilation with JDK 17.
2022-01-08 10:17:28 -08:00

80 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
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 "edu.wpi.first.wpiutil:wpiutil-java:$wpilibVersion"
implementation "edu.wpi.first.cameraserver:cameraserver-java:$wpilibVersion"
implementation "edu.wpi.first.cscore:cscore-java:$wpilibVersion"
jniPlatforms.each { implementation "edu.wpi.first.cscore:cscore-jni:$wpilibVersion:$it" }
implementation "edu.wpi.first.ntcore:ntcore-java:$wpilibVersion"
jniPlatforms.each { implementation "edu.wpi.first.ntcore:ntcore-jni:$wpilibVersion:$it" }
implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:$opencvVersion"
jniPlatforms.each { implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-jni:$opencvVersion:$it" }
implementation "edu.wpi.first.wpimath:wpimath-java:2022.1.1"
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*'
}
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/**"
)
}))
}
}