blob: 2016632531b6b3164dc42626a34baef4168e99e0 [file] [log] [blame]
Brian Silverman41cdd3e2019-01-19 19:48:58 -08001apply plugin: 'java'
Brian Silverman41cdd3e2019-01-19 19:48:58 -08002
3ext {
4 useJava = true
5 useCpp = false
6 skipDev = true
7}
8
9apply from: "${rootDir}/shared/opencv.gradle"
10
11
12
13dependencies {
James Kuszmaul4b81d302019-12-14 20:53:14 -080014 implementation project(':wpilibj')
Brian Silverman41cdd3e2019-01-19 19:48:58 -080015
James Kuszmaul4b81d302019-12-14 20:53:14 -080016 implementation project(':hal')
17 implementation project(':wpiutil')
18 implementation project(':ntcore')
19 implementation project(':cscore')
20 implementation project(':cameraserver')
21 implementation project(':wpilibOldCommands')
22 implementation project(':wpilibNewCommands')
Brian Silverman41cdd3e2019-01-19 19:48:58 -080023}
24
James Kuszmaul4f3ad3c2019-12-01 16:35:21 -080025if (!project.hasProperty('skipPMD')) {
26 apply plugin: 'pmd'
27
28 pmd {
29 consoleOutput = true
30 reportsDir = file("$project.buildDir/reports/pmd")
31 ruleSetFiles = files(new File(rootDir, "styleguide/pmd-ruleset.xml"))
32 ruleSets = []
33 }
Brian Silverman41cdd3e2019-01-19 19:48:58 -080034}
35
36gradle.projectsEvaluated {
37 tasks.withType(JavaCompile) {
James Kuszmaul4f3ad3c2019-12-01 16:35:21 -080038 options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Werror"
Brian Silverman41cdd3e2019-01-19 19:48:58 -080039 }
40}
41
James Kuszmaul397f6fe2020-01-04 16:21:52 -080042tasks.register('buildDesktopJava') {
43 it.dependsOn tasks.withType(JavaCompile)
44}
45
Brian Silverman41cdd3e2019-01-19 19:48:58 -080046apply from: 'publish.gradle'
47
48ext {
49 templateDirectory = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/templates/")
50 templateFile = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/templates/templates.json")
51 exampleDirectory = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/examples/")
52 exampleFile = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/examples/examples.json")
53 commandDirectory = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/commands/")
54 commandFile = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/commands/commands.json")
55}
56
James Kuszmaul4b81d302019-12-14 20:53:14 -080057ext {
58 isCppCommands = false
59}
Brian Silverman41cdd3e2019-01-19 19:48:58 -080060apply from: "${rootDir}/shared/examplecheck.gradle"