-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
61 lines (48 loc) · 1.83 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
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2020.3.2"
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
def ROBOT_MAIN_CLASS = "com.pigmice.frc.robot.Main"
deploy {
targets {
roboRIO("roborio") {
team = frc.getTeamNumber()
}
}
artifacts {
frcJavaArtifact('frcJava') {
targets << "roborio"
debug = frc.getDebugOrDefault(false)
}
fileTreeArtifact('frcStaticFileDeploy') {
files = fileTree(dir: 'src/main/deploy')
targets << "roborio"
directory = '/home/lvuser/deploy'
}
}
def deployTimestampFile = file('src/main/deploy/deployTimestamp.properties')
def Properties deployTimestamp = new Properties()
deployTimestamp['DEPLOY_TIMESTAMP'] = new Date().format('HH:mm:ss')
deployTimestamp.store(deployTimestampFile.newWriter(), null)
logger.info('Writing deploy timestamp')
}
def includeDesktopSupport = false
dependencies {
wpi.deps.vendor.loadFrom(project(':robolib'))
compile project("robolib")
implementation wpi.deps.wpilib()
nativeZip wpi.deps.wpilibJni(wpi.platforms.roborio)
nativeDesktopZip wpi.deps.wpilibJni(wpi.platforms.desktop)
implementation wpi.deps.vendor.java()
nativeZip wpi.deps.vendor.jni(wpi.platforms.roborio)
nativeDesktopZip wpi.deps.vendor.jni(wpi.platforms.desktop)
simulation wpi.deps.sim.gui(wpi.platforms.desktop, false)
testImplementation 'org.hamcrest:hamcrest:2.1'
testImplementation 'org.junit.jupiter:junit-jupiter:5.5.1'
}
jar {
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
}