-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
56 lines (50 loc) · 1.63 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
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2018.06.21"
// id "edu.wpi.first.GradleRIO" version "2019.0.0-alpha-3"
id "eclipse"
id "idea"
id "com.diffplug.gradle.spotless" version "3.14.0"
}
def TEAM = 9991
def ROBOT_CLASS = "org.usfirst.frc.team4931.robot.Robot"
// Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project EmbeddedTools.
deploy {
targets {
target("roborio", edu.wpi.first.gradlerio.frc.RoboRIO) {
// Team can be overridden by command line, for use with VSCode
team = getTeamOrDefault(9991)
}
}
artifacts {
artifact('frcJava', edu.wpi.first.gradlerio.frc.FRCJavaArtifact) {
targets << "roborio"
// Debug can be overridden by command line, for use with VSCode
debug = getDebugOrDefault(false)
}
}
}
spotless {
java {
googleJavaFormat()
removeUnusedImports()
}
}
// Defining my dependencies. In this case, WPILib (+ friends), CTRE Toolsuite (Talon SRX)
// and NavX.
dependencies {
compile wpilib()
compile ctre()
compile navx()
}
// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
// in order to make them all available at runtime. Also adding the manifest so WPILib
// knows where to look for our Robot Class.
jar {
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_CLASS)
}
task wrapper(type: Wrapper) {
gradleVersion = '4.10.1'
}