2017-10-17 01:30:21 -04:00
|
|
|
apply plugin: 'java'
|
2020-11-26 14:47:35 -05:00
|
|
|
apply plugin: 'jacoco'
|
2017-10-17 01:30:21 -04:00
|
|
|
|
2018-04-29 13:29:07 -07:00
|
|
|
ext {
|
|
|
|
|
useJava = true
|
|
|
|
|
useCpp = false
|
|
|
|
|
skipDev = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
apply from: "${rootDir}/shared/opencv.gradle"
|
|
|
|
|
|
2020-11-26 14:47:35 -05:00
|
|
|
test {
|
|
|
|
|
useJUnitPlatform()
|
|
|
|
|
systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
|
|
|
|
|
testLogging {
|
|
|
|
|
events "failed"
|
|
|
|
|
exceptionFormat "full"
|
|
|
|
|
}
|
|
|
|
|
finalizedBy jacocoTestReport
|
|
|
|
|
}
|
2018-04-29 13:29:07 -07:00
|
|
|
|
2020-11-26 14:47:35 -05:00
|
|
|
if (project.hasProperty('onlylinuxathena') || project.hasProperty('onlylinuxraspbian') || project.hasProperty('onlylinuxaarch64bionic')) {
|
|
|
|
|
test.enabled = false
|
|
|
|
|
}
|
2018-04-29 13:29:07 -07:00
|
|
|
|
2017-10-17 01:30:21 -04:00
|
|
|
dependencies {
|
2019-11-12 17:14:04 -08:00
|
|
|
implementation project(':wpilibj')
|
|
|
|
|
|
2020-08-06 23:57:39 -07:00
|
|
|
implementation project(':wpimath')
|
2019-11-12 17:14:04 -08:00
|
|
|
implementation project(':hal')
|
|
|
|
|
implementation project(':wpiutil')
|
|
|
|
|
implementation project(':ntcore')
|
|
|
|
|
implementation project(':cscore')
|
|
|
|
|
implementation project(':cameraserver')
|
|
|
|
|
implementation project(':wpilibOldCommands')
|
|
|
|
|
implementation project(':wpilibNewCommands')
|
2020-11-26 14:47:35 -05:00
|
|
|
|
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.2'
|
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.4.2'
|
|
|
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.2'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
jacoco {
|
|
|
|
|
toolVersion = "0.8.4"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
jacocoTestReport {
|
|
|
|
|
reports {
|
|
|
|
|
xml.enabled true
|
|
|
|
|
html.enabled true
|
|
|
|
|
}
|
2017-10-17 01:30:21 -04:00
|
|
|
}
|
|
|
|
|
|
2019-06-28 14:09:10 -07:00
|
|
|
if (!project.hasProperty('skipPMD')) {
|
|
|
|
|
apply plugin: 'pmd'
|
|
|
|
|
|
|
|
|
|
pmd {
|
|
|
|
|
consoleOutput = true
|
|
|
|
|
reportsDir = file("$project.buildDir/reports/pmd")
|
|
|
|
|
ruleSetFiles = files(new File(rootDir, "styleguide/pmd-ruleset.xml"))
|
|
|
|
|
ruleSets = []
|
|
|
|
|
}
|
2017-10-17 01:30:21 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gradle.projectsEvaluated {
|
|
|
|
|
tasks.withType(JavaCompile) {
|
2019-08-04 23:35:33 -04:00
|
|
|
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Werror"
|
2017-10-17 01:30:21 -04:00
|
|
|
}
|
|
|
|
|
}
|
2017-10-21 15:33:42 -07:00
|
|
|
|
2019-12-20 13:48:26 -08:00
|
|
|
tasks.register('buildDesktopJava') {
|
|
|
|
|
it.dependsOn tasks.withType(JavaCompile)
|
|
|
|
|
}
|
|
|
|
|
|
2017-10-21 15:33:42 -07:00
|
|
|
apply from: 'publish.gradle'
|
2018-05-24 17:08:37 -07:00
|
|
|
|
|
|
|
|
ext {
|
|
|
|
|
templateDirectory = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/templates/")
|
|
|
|
|
templateFile = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/templates/templates.json")
|
|
|
|
|
exampleDirectory = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/examples/")
|
|
|
|
|
exampleFile = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/examples/examples.json")
|
|
|
|
|
commandDirectory = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/commands/")
|
|
|
|
|
commandFile = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/commands/commands.json")
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-28 20:10:05 -07:00
|
|
|
ext {
|
|
|
|
|
isCppCommands = false
|
|
|
|
|
}
|
2018-05-24 17:08:37 -07:00
|
|
|
apply from: "${rootDir}/shared/examplecheck.gradle"
|