forked from blair-robot-project/ballbasaur-rewrite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
136 lines (117 loc) · 3.64 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
plugins {
id 'org.hidetake.ssh' version "2.9.0"
id 'java'
id 'eclipse'
id 'idea'
id "jaci.openrio.gradle.GradleRIO" version "2017.10.30"
}
allprojects {
tasks.withType(Javadoc).all { enabled = true }
repositories {
maven {
url 'https://jitpack.io'
}
}
}
repositories {
mavenCentral()
maven {
name = "GradleRio"
url = "http://dev.imjac.in/maven"
}
maven { url "https://plugins.gradle.org/m2/" }
}
group 'org.usfirst.frc.team449.ballbasaur-rewrite'
version '1.0'
def TEAM = 449
def ROBOT_CLASS = "org.usfirst.frc.team449.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 {
artifact('frcJava', jaci.openrio.gradle.frc.FRCJavaArtifact) {
targets << "roborio"
}
}
}
wpi {
wpilibVersion = "2017.3.1" // The WPILib version to use. For this version of GradleRIO, must be a 2017 version.
ntcoreVersion = "3.1.7" // The NetworkTables Core version to use.
opencvVersion = "3.1.0" // The OpenCV version to use.
cscoreVersion = "1.0.2" // The CSCore version to use.
ctreVersion = "4.4.1.14" // The CTRE Toolsuite (Talon SRX) version to use.
navxVersion = "3.0.331" // The NavX-MXP library version to use.
smartDashboardVersion = '...'
javaInstallerVersion = '...'
toolchainVersion = '...'
}
dependencies {
compile 'com.github.blair-robot-project:robot2017:jitpack-SNAPSHOT'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.0.pr3'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.0.pr3'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.0.pr3'
compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.9.0.pr3'
//com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.0.pr3
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names', version: '2.9.0.pr3'
compile 'org.jetbrains:annotations:13.0'
compile wpilib()
compile ctre()
compile navx()
}
/* CopyResources stuff */
remotes {
rio {
host = 'roboRIO-449-frc.local'
user = 'lvuser'
knownHosts = allowAnyHosts
}
}
task('copyResources') {
doLast {
ssh.run {
session(remotes.rio) {
execute 'mkdir ~/449_resources', ignoreError: true
execute 'mkdir ~/logs', ignoreError: true
put from: fileTree('src/main/resources'), into: './449_resources/'
execute ". /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r", ignoreError: true
}
}
}
}
/* Generic artifact gen stuff */
// Java only. Setup your Jar File.
jar {
// Compile a 'fat jar' (libraries included)
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
// Include your Manifest. Arguments are your Robot Main Class.
manifest jaci.openrio.gradle.GradleRIOPlugin.javaManifest(ROBOT_CLASS)
}
task genJavadoc(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task deleteDocs(type: Delete){
delete '../docs'
followSymlinks = false
}
task copyDocs(type: Copy, dependsOn: [genJavadoc, deleteDocs]){
from 'build/docs/javadoc'
into '../docs'
}
artifacts {
archives genJavadoc
}
compileJava {
options.compilerArgs << '-parameters'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.2.1'
}