-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
77 lines (64 loc) · 2.11 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
buildscript {
ext.kotlin_version = '1.2.10'
ext.serialization_version = '0.4'
repositories {
jcenter()
maven { url "https://kotlin.bintray.com/kotlinx" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:$serialization_version"
}
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.1.51"
id "eclipse"
id "idea"
id "jaci.openrio.gradle.GradleRIO" version "2018.01.06"
}
apply plugin: 'idea'
apply plugin: 'kotlin'
apply plugin: 'kotlinx-serialization'
def TEAM = 4099
def ROBOT_CLASS = "org.usfirst.frc.team4099.robot.Robot"
// Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project EmbeddedTools.
deploy {
targets {
target("roborio", jaci.openrio.gradle.frc.RoboRIO) {
team = TEAM
}
}
artifacts {
// We still use FRCJavaArtifact since kotlin does respond as a Java build.
artifact('frcKotlin', jaci.openrio.gradle.frc.FRCJavaArtifact) {
targets << "roborio"
jar = 'jar'
}
}
}
repositories {
mavenCentral()
jcenter()
maven { url "https://kotlin.bintray.com/kotlinx" }
}
// Defining my dependencies. In this case, WPILib (+ friends), CTRE Toolsuite (Talon SRX)
// and NavX.
dependencies {
compile wpilib()
compile ctre()
compile navx()
// We need to add the Kotlin stdlib in order to use most Kotlin language features.
compile "org.jetbrains.kotlin:kotlin-stdlib"
compile "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serialization_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 jaci.openrio.gradle.GradleRIOPlugin.javaManifest(ROBOT_CLASS)
}
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
}