apply plugin: 'java' apply plugin: 'jacoco' ext { useJava = true useCpp = false skipDev = true } apply from: "${rootDir}/shared/opencv.gradle" test { useJUnitPlatform() systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true' testLogging { events "failed" exceptionFormat "full" } finalizedBy jacocoTestReport } if (project.hasProperty('onlylinuxathena') || project.hasProperty('onlylinuxraspbian') || project.hasProperty('onlylinuxaarch64bionic')) { test.enabled = false } dependencies { implementation project(':wpilibj') implementation project(':wpimath') implementation project(':hal') implementation project(':wpiutil') implementation project(':ntcore') implementation project(':cscore') implementation project(':cameraserver') implementation project(':wpilibOldCommands') implementation project(':wpilibNewCommands') 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 } } 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 = [] } } gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Werror" } } tasks.register('buildDesktopJava') { it.dependsOn tasks.withType(JavaCompile) } apply from: 'publish.gradle' 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") } ext { isCppCommands = false } apply from: "${rootDir}/shared/examplecheck.gradle"