-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
85 lines (73 loc) · 2.26 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
plugins {
id "java"
id "org.jetbrains.kotlin.jvm" version "1.3.21"
id "edu.wpi.first.GradleRIO" version "2019.4.1"
id "idea"
id "com.diffplug.gradle.spotless" version "3.16.0"
}
def ROBOT_MAIN_CLASS = "frc.team2767.deepspace.Main"
deploy {
targets {
roboRIO("roborio") {
team = frc.getTeamNumber() // loaded from .wpilib/wpilib_preferences.json
}
}
artifacts {
frcJavaArtifact("frcJava") {
targets << "roborio"
debug = frc.getDebugOrDefault(false)
}
// Built in artifact to deploy arbitrary files to the roboRIO.
fileTreeArtifact("frcStaticFileDeploy") {
// The directory below is the local directory to deploy
files = fileTree(dir: "src/main/deploy")
// Deploy to RoboRIO target, into /home/lvuser/deploy
targets << "roborio"
directory = "/home/lvuser/deploy"
}
}
}
repositories {
jcenter()
}
dependencies {
compile wpi.deps.wpilib()
compile wpi.deps.vendor.java()
nativeZip wpi.deps.vendor.jni(wpi.platforms.roborio)
nativeDesktopZip wpi.deps.vendor.jni(wpi.platforms.desktop)
compile "org.strykeforce.thirdcoast:swerve:${thirdcoastVersion}"
compile "org.strykeforce.thirdcoast:telemetry:${thirdcoastVersion}"
compile "ch.qos.logback:logback-classic:${logbackVersion}"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}"
compile "org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.+"
// Testing
testCompile "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testCompile "org.junit.jupiter:junit-jupiter-params:${junitVersion}"
testRuntime "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
testCompile "org.assertj:assertj-core:3.11.1"
}
compileKotlin{
kotlinOptions{
jvmTarget = "1.8"
freeCompilerArgs = ["-progressive"]
}
}
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
spotless {
java {
googleJavaFormat()
lineEndings = 'GIT_ATTRIBUTES'
}
}
test {
useJUnitPlatform()
}