-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
107 lines (95 loc) · 2.91 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import jaci.gradle.deploy.artifact.FileCollectionArtifact
import jaci.openrio.gradle.GradleRIOPlugin
import jaci.openrio.gradle.frc.FRCJavaArtifact
import jaci.openrio.gradle.frc.RoboRIO
buildscript {
ext.kotlin_version = '1.2.41'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.2.21"
id "java"
id "eclipse"
id "idea"
id "jaci.openrio.gradle.GradleRIO" version "2018.03.06"
}
apply plugin: 'kotlin'
def TEAM = 5190
def ROBOT_CLASS = "frc.team5190.robot.Robot"
// Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project EmbeddedTools.
deploy {
targets {
target("roborio", RoboRIO) {
team = TEAM
user = 'admin'
password = ''
}
}
artifacts {
artifact('frcJava', FRCJavaArtifact) {
targets << "roborio"
}
artifact('LS-LL', FileCollectionArtifact) {
files = project.fileTree(dir: 'src/main/resources/LS-LL')
directory = '/home/lvuser/paths/LS-LL'
targets << "roborio"
}
artifact('LS-RR', FileCollectionArtifact) {
files = project.fileTree(dir: 'src/main/resources/LS-RR')
directory = '/home/lvuser/paths/LS-RR'
targets << "roborio"
}
artifact('CS-L', FileCollectionArtifact) {
files = project.fileTree(dir: 'src/main/resources/CS-L')
directory = '/home/lvuser/paths/CS-L'
targets << "roborio"
}
artifact('CS-R', FileCollectionArtifact) {
files = project.fileTree(dir: 'src/main/resources/CS-R')
directory = '/home/lvuser/paths/CS-R'
targets << "roborio"
}
}
}
repositories {
mavenCentral()
}
// Defining my dependencies. In this case, WPILib (+ friends), CTRE Toolsuite (Talon SRX)
// and NavX.
dependencies {
compile wpilib()
compile ctre()
compile navx()
compile openrio.powerup.matchData()
compile pathfinder()
compile 'com.github.salomonbrys.kotson:kotson:2.5.0'
compile 'org.apache.commons:commons-math3:3.6.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
// 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 GradleRIOPlugin.javaManifest(ROBOT_CLASS)
}
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}