-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
54 lines (40 loc) · 1.71 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
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2021.3.1"
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
def ROBOT_MAIN_CLASS = "frc.robot.Main"
// Set this to true to enable desktop support.
def includeDesktopSupport = true
test {
useJUnitPlatform()
}
dependencies {
implementation wpi.deps.wpilib()
nativeDesktopZip wpi.deps.wpilibJni(wpi.platforms.desktop)
implementation wpi.deps.vendor.java()
nativeDesktopZip wpi.deps.vendor.jni(wpi.platforms.desktop)
implementation platform('org.junit:junit-bom:5.7.1')
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
// Enable simulation gui support. Must check the box in vscode to enable support
// upon debugging
simulation wpi.deps.sim.gui(wpi.platforms.desktop, false)
simulation wpi.deps.sim.driverstation(wpi.platforms.desktop, false)
// Websocket extensions require additional configuration.
// simulation wpi.deps.sim.ws_server(wpi.platforms.desktop, false)
simulation wpi.deps.sim.ws_client(wpi.platforms.desktop, false)
}
// Set the websocket remote host (the Romi IP address).
sim {
envVar "HALSIMWS_HOST", "10.0.0.2"
}
// 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.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
}