Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame^] | 1 | apply plugin: 'java' |
| 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 { |
| 14 | implementation project(':wpilibj') |
| 15 | |
| 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') |
| 23 | } |
| 24 | |
| 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 | } |
| 34 | } |
| 35 | |
| 36 | gradle.projectsEvaluated { |
| 37 | tasks.withType(JavaCompile) { |
| 38 | options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Werror" |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | tasks.register('buildDesktopJava') { |
| 43 | it.dependsOn tasks.withType(JavaCompile) |
| 44 | } |
| 45 | |
| 46 | apply from: 'publish.gradle' |
| 47 | |
| 48 | ext { |
| 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 | |
| 57 | ext { |
| 58 | isCppCommands = false |
| 59 | } |
| 60 | apply from: "${rootDir}/shared/examplecheck.gradle" |