|
1 | 1 | buildscript { |
2 | | - repositories { |
3 | | - jcenter() |
4 | | - maven { url "https://plugins.gradle.org/m2/" } |
5 | | - } |
6 | | - dependencies { |
7 | | - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+' |
8 | | - classpath "edu.wpi.first:GradleRIO:2019.4.1" |
9 | | - classpath "com.diffplug.spotless:spotless-plugin-gradle:3.24.2" |
10 | | - } |
| 2 | + ext { |
| 3 | + kotlinVersion = '1.3.60' |
| 4 | + moshiVersion = '1.8.0' |
| 5 | + jettyVersion = '9.4.19.v20190610' |
| 6 | + okhttpVersion = '3.12.5' |
| 7 | + slf4jVersion = '1.7.28' |
| 8 | + logbackVersion = '1.2.3' |
| 9 | + kotlinLoggingVersion = '1.7.6' |
| 10 | + dokkaVersion = '0.9.18' |
| 11 | + junitVersion = '5.+' |
| 12 | + jsonAssert = '1.+' |
| 13 | + assertJVersion = '3.+' |
| 14 | + mockitoVersion = '2.+' |
| 15 | + gradleRioVersion = '2019.4.1' |
| 16 | + bintrayVersion = '1.+' |
| 17 | + spotlessVersion = '3.+' |
| 18 | + wpiVersion = '2019.4.1' |
| 19 | + } |
| 20 | + repositories { |
| 21 | + jcenter() |
| 22 | + maven { url "https://plugins.gradle.org/m2/" } |
| 23 | + } |
| 24 | + dependencies { |
| 25 | + classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$bintrayVersion" |
| 26 | + classpath "edu.wpi.first:GradleRIO:$gradleRioVersion" |
| 27 | + classpath "com.diffplug.spotless:spotless-plugin-gradle:$spotlessVersion" |
| 28 | + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" |
| 29 | + classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion" |
| 30 | + } |
11 | 31 | } |
12 | 32 |
|
| 33 | +// applies to all sub-projects |
13 | 34 | configure(subprojects) { |
14 | | - group = 'org.strykeforce.thirdcoast' |
15 | | - version = '19.4.1' |
| 35 | + group = 'org.strykeforce.thirdcoast' |
| 36 | + version = '19.5.0' |
16 | 37 |
|
17 | | - apply plugin: 'java-library' |
18 | | - apply plugin: 'idea' |
| 38 | + apply plugin: 'java-library' |
| 39 | + apply plugin: 'idea' |
19 | 40 |
|
20 | | - repositories { |
21 | | - jcenter() |
22 | | - } |
| 41 | + sourceCompatibility = 11 |
23 | 42 |
|
24 | | - dependencies { |
25 | | - implementation 'org.slf4j:slf4j-api:1.7.25' |
| 43 | + repositories { |
| 44 | + jcenter() |
| 45 | + } |
26 | 46 |
|
27 | | - compileOnly 'com.google.code.findbugs:jsr305:3.0.2' |
| 47 | + dependencies { |
| 48 | + implementation "org.slf4j:slf4j-api:$slf4jVersion" |
28 | 49 |
|
29 | | - // Testing |
30 | | - testImplementation "org.junit.jupiter:junit-jupiter-params:5.+" |
31 | | - testImplementation "org.junit.jupiter:junit-jupiter-api:5.+" |
32 | | - testImplementation "org.assertj:assertj-core:3.+" |
33 | | - testImplementation "org.mockito:mockito-junit-jupiter:2.+" |
34 | | - testRuntime "org.junit.jupiter:junit-jupiter-engine:5.+" |
35 | | - testRuntime 'ch.qos.logback:logback-classic:1.2.3' |
36 | | - } |
| 50 | + // Testing |
| 51 | + testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion" |
| 52 | + testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion" |
| 53 | + testImplementation "org.assertj:assertj-core:$assertJVersion" |
| 54 | + testImplementation "org.mockito:mockito-junit-jupiter:$mockitoVersion" |
| 55 | + testRuntime "org.junit.jupiter:junit-jupiter-engine:$junitVersion" |
| 56 | + testRuntime "ch.qos.logback:logback-classic:$logbackVersion" |
| 57 | + } |
37 | 58 |
|
38 | | - idea { |
39 | | - module { |
40 | | - downloadJavadoc = true |
41 | | - downloadSources = true |
42 | | - sourceDirs += files('build/generated/source/kaptKotlin/main') |
43 | | - generatedSourceDirs += files('build/generated/source/kaptKotlin/main') |
44 | | - } |
| 59 | + idea { |
| 60 | + module { |
| 61 | + downloadJavadoc = true |
| 62 | + downloadSources = true |
45 | 63 | } |
| 64 | + } |
46 | 65 |
|
47 | | - test { |
48 | | - useJUnitPlatform() |
49 | | - } |
| 66 | + test { |
| 67 | + useJUnitPlatform() |
| 68 | + } |
50 | 69 | } |
51 | 70 |
|
| 71 | +// applies to all sub-projects except for deadeye |
52 | 72 | configure(subprojects - project(":deadeye")) { |
53 | | - apply plugin: "edu.wpi.first.GradleRIO" |
| 73 | + apply plugin: "edu.wpi.first.GradleRIO" |
54 | 74 |
|
55 | | - dependencies { |
56 | | - compile wpi.deps.wpilib() |
57 | | - compile wpi.deps.vendor.java() |
58 | | - } |
| 75 | + dependencies { |
| 76 | + implementation wpi.deps.wpilib() |
| 77 | + implementation wpi.deps.vendor.java() |
| 78 | + } |
| 79 | +} |
| 80 | + |
| 81 | +// applies to all Kotlin sub-projects |
| 82 | +configure(subprojects - project(":swerve")) { |
| 83 | + apply plugin: "kotlin" |
| 84 | + apply plugin: "kotlin-kapt" |
| 85 | + apply plugin: 'org.jetbrains.dokka' |
| 86 | + |
| 87 | + dependencies { |
| 88 | + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion" |
| 89 | + implementation "io.github.microutils:kotlin-logging:$kotlinLoggingVersion" |
| 90 | + implementation "com.squareup.moshi:moshi:$moshiVersion" |
| 91 | + kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion" |
| 92 | + } |
59 | 93 | } |
0 commit comments