forked from Team254/FRC-2018-Public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·105 lines (91 loc) · 2.8 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
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.3'
classpath 'gov.nist.math:jama:1.0.3'
classpath 'com.bmuschko:gradle-tomcat-plugin:2.0'
}
}
plugins {
id "java"
id "eclipse"
id "idea"
id "jaci.openrio.gradle.GradleRIO" version "2018.03.06"
id 'war'
}
repositories {
mavenLocal()
mavenCentral()
}
apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: 'com.bmuschko.tomcat'
def TEAM = 254
def ROBOT_CLASS = "com.team254.frc2018.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 {
artifact('frcJava', jaci.openrio.gradle.frc.FRCJavaArtifact) {
targets << "roborio"
}
}
}
wpi {
wpilibVersion = '2018.4.1'
ctreVersion = '5.3.1.0'
shuffleboardVersion = '1.3.1'
}
// Defining my dependencies. In this case, WPILib (+ friends), CTRE Toolsuite (Talon SRX)
// and NavX.
dependencies {
compile wpilib()
compile ctre()
compile navx()
compile("gov.nist.math:jama:1.0.3")
testCompile("org.junit.jupiter:junit-jupiter-api:5.0.3")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.0.3")
def tomcatVersion = '7.0.57'
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}"
tomcat("org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}") {
exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj'
}
compile("org.springframework:spring-webmvc:4.3.0.RELEASE")
compile("javax.servlet:javax.servlet-api:3.0.1")
compile("javax.servlet:jstl:1.2")
}
// context where tomcat is deployed, by default localhost:8080/
tomcatRun.contextPath = '/'
tomcatRunWar.contextPath = '/'
// 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)
}
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.compilerArgs += '-parameters'
}
junitPlatform {
filters {
engines {
}
tags {
exclude 'slow'
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
}