Brian Silverman | 41cdd3e | 2019-01-19 19:48:58 -0800 | [diff] [blame] | 1 | apply plugin: 'java' |
Brian Silverman | 41cdd3e | 2019-01-19 19:48:58 -0800 | [diff] [blame] | 2 | |
| 3 | ext { |
| 4 | useJava = true |
| 5 | useCpp = false |
| 6 | skipDev = true |
| 7 | } |
| 8 | |
| 9 | apply from: "${rootDir}/shared/opencv.gradle" |
| 10 | |
| 11 | |
| 12 | |
| 13 | dependencies { |
James Kuszmaul | 4b81d30 | 2019-12-14 20:53:14 -0800 | [diff] [blame^] | 14 | implementation project(':wpilibj') |
Brian Silverman | 41cdd3e | 2019-01-19 19:48:58 -0800 | [diff] [blame] | 15 | |
James Kuszmaul | 4b81d30 | 2019-12-14 20:53:14 -0800 | [diff] [blame^] | 16 | 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 Silverman | 41cdd3e | 2019-01-19 19:48:58 -0800 | [diff] [blame] | 23 | } |
| 24 | |
James Kuszmaul | 4f3ad3c | 2019-12-01 16:35:21 -0800 | [diff] [blame] | 25 | if (!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 Silverman | 41cdd3e | 2019-01-19 19:48:58 -0800 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | gradle.projectsEvaluated { |
| 37 | tasks.withType(JavaCompile) { |
James Kuszmaul | 4f3ad3c | 2019-12-01 16:35:21 -0800 | [diff] [blame] | 38 | options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Werror" |
Brian Silverman | 41cdd3e | 2019-01-19 19:48:58 -0800 | [diff] [blame] | 39 | } |
| 40 | } |
| 41 | |
| 42 | apply from: 'publish.gradle' |
| 43 | |
| 44 | ext { |
| 45 | templateDirectory = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/templates/") |
| 46 | templateFile = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/templates/templates.json") |
| 47 | exampleDirectory = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/examples/") |
| 48 | exampleFile = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/examples/examples.json") |
| 49 | commandDirectory = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/commands/") |
| 50 | commandFile = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/commands/commands.json") |
| 51 | } |
| 52 | |
James Kuszmaul | 4b81d30 | 2019-12-14 20:53:14 -0800 | [diff] [blame^] | 53 | ext { |
| 54 | isCppCommands = false |
| 55 | } |
Brian Silverman | 41cdd3e | 2019-01-19 19:48:58 -0800 | [diff] [blame] | 56 | apply from: "${rootDir}/shared/examplecheck.gradle" |