|
1 | | -buildscript { |
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 | | - } |
| 1 | +plugins { |
| 2 | + id "java" |
| 3 | + id "idea" |
| 4 | + id "maven-publish" |
| 5 | + id "org.jetbrains.kotlin.jvm" version "1.3.61" |
| 6 | + id "org.jetbrains.kotlin.kapt" version "1.3.61" |
| 7 | + id "edu.wpi.first.GradleRIO" version "2020.1.2" |
31 | 8 | } |
32 | 9 |
|
33 | | -// applies to all sub-projects |
34 | | -configure(subprojects) { |
35 | | - group = 'org.strykeforce.thirdcoast' |
36 | | - version = '19.5.1' |
| 10 | +group = 'org.strykeforce' |
| 11 | +version = '20.0.1' |
37 | 12 |
|
38 | | - apply plugin: 'java-library' |
39 | | - apply plugin: 'idea' |
| 13 | +sourceCompatibility = JavaVersion.VERSION_11 |
| 14 | +targetCompatibility = JavaVersion.VERSION_11 |
40 | 15 |
|
41 | | - sourceCompatibility = 11 |
| 16 | +// Set this to true to enable desktop support. |
| 17 | +def includeDesktopSupport = false |
| 18 | + |
| 19 | +// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries. |
| 20 | +// Also defines JUnit 4. |
| 21 | +dependencies { |
| 22 | + implementation wpi.deps.wpilib() |
| 23 | + nativeZip wpi.deps.wpilibJni(wpi.platforms.roborio) |
| 24 | + nativeDesktopZip wpi.deps.wpilibJni(wpi.platforms.desktop) |
42 | 25 |
|
43 | | - repositories { |
44 | | - jcenter() |
45 | | - } |
46 | 26 |
|
47 | | - dependencies { |
48 | | - implementation "org.slf4j:slf4j-api:$slf4jVersion" |
| 27 | + implementation wpi.deps.vendor.java() |
| 28 | + nativeZip wpi.deps.vendor.jni(wpi.platforms.roborio) |
| 29 | + nativeDesktopZip wpi.deps.vendor.jni(wpi.platforms.desktop) |
| 30 | + |
| 31 | + implementation "org.jetbrains.kotlin:kotlin-stdlib" |
| 32 | + implementation "org.slf4j:slf4j-api:1.7.28" |
| 33 | + implementation "org.eclipse.jetty:jetty-server:9.4.19.v20190610" |
| 34 | + implementation "com.squareup.okhttp3:okhttp:3.12.5" |
| 35 | + implementation "io.github.microutils:kotlin-logging:1.7.6" |
| 36 | + implementation "com.squareup.moshi:moshi:1.8.0" |
| 37 | + kapt "com.squareup.moshi:moshi-kotlin-codegen:1.8.0" |
49 | 38 |
|
50 | 39 | // 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 | | - } |
| 40 | + testImplementation "org.junit.jupiter:junit-jupiter-params:5.+" |
| 41 | + testImplementation "org.junit.jupiter:junit-jupiter-api:5.+" |
| 42 | + testImplementation "org.assertj:assertj-core:3.+" |
| 43 | + testImplementation "org.mockito:mockito-junit-jupiter:2.+" |
| 44 | + testImplementation "org.skyscreamer:jsonassert:1.+" |
| 45 | + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.+" |
| 46 | + testRuntimeOnly "ch.qos.logback:logback-classic:1.2.+" |
58 | 47 |
|
59 | | - idea { |
| 48 | + compileOnly 'org.jetbrains:annotations:15.0' |
| 49 | +} |
| 50 | + |
| 51 | +java { |
| 52 | + withSourcesJar() |
| 53 | +} |
| 54 | + |
| 55 | +idea { |
60 | 56 | module { |
61 | 57 | downloadJavadoc = true |
62 | 58 | downloadSources = true |
63 | 59 | } |
64 | | - } |
65 | | - |
66 | | - test { |
67 | | - useJUnitPlatform() |
68 | | - } |
69 | 60 | } |
70 | 61 |
|
71 | | -// applies to all sub-projects except for deadeye |
72 | | -configure(subprojects - project(":deadeye")) { |
73 | | - apply plugin: "edu.wpi.first.GradleRIO" |
74 | | - |
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' |
| 62 | +publishing { |
| 63 | + publications { |
| 64 | + thirdcoastLibrary(MavenPublication) { |
| 65 | + from components.java |
| 66 | + } |
| 67 | + } |
86 | 68 |
|
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 | | - } |
| 69 | + repositories { |
| 70 | + maven { |
| 71 | + url "s3://maven.strykeforce.org/repo" |
| 72 | + credentials(AwsCredentials) { |
| 73 | + accessKey "${System.getenv('STRYKEFORCE_AWS_KEY')}" |
| 74 | + secretKey "${System.getenv('STRYKEFORCE_AWS_SECRET')}" |
| 75 | + } |
| 76 | + } |
| 77 | + } |
93 | 78 | } |
0 commit comments