forked from PhotonVision/photonvision
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.gradle
More file actions
105 lines (87 loc) · 3.69 KB
/
common.gradle
File metadata and controls
105 lines (87 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// Plugins
apply plugin: "java"
apply plugin: "jacoco"
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
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);
wpi.getVersions().getWpimathVersion().convention(wpimathVersion);
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 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 wpilibTools.deps.wpilibJava("apriltag")
implementation wpilibTools.deps.wpilibJava("wpiunits")
implementation wpilibTools.deps.wpilibOpenCvJava("frc" + openCVYear, wpi.versions.opencvVersion.get())
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();
implementation "commons-io:commons-io:2.11.0"
implementation "commons-cli:commons-cli:1.5.0"
implementation "org.apache.commons:commons-exec:1.3"
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()
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
workingDir = new File("${rootDir}")
finalizedBy jacocoTestReport
}
tasks.register('testHeadless', Test) {
group = "verification"
systemProperty("java.awt.headless", "true")
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
exceptionFormat = "full"
showStandardStreams = true
}
exclude '**/*BenchmarkTest*'
workingDir = new File("${rootDir}")
}
jacoco {
toolVersion = "0.8.10"
reportsDirectory = layout.buildDirectory.dir('customJacocoReportDir')
}
jacocoTestReport {
dependsOn testHeadless
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/**"
)
}))
}
}
// Only run headless tests from the build task
gradle.taskGraph.whenReady { graph ->
if (graph.hasTask(build)) {
test.enabled = false
}
}