You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: testing/jni/build.gradle
+62-51Lines changed: 62 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -2,113 +2,124 @@ plugins {
2
2
id "java"
3
3
id "cpp"
4
4
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-2"
5
-
id 'edu.wpi.first.GradleJni' version '0.10.1'
5
+
id 'edu.wpi.first.GradleJni' version '1.1.0'
6
6
}
7
7
8
-
sourceCompatibility =JavaVersion.VERSION_17
9
-
targetCompatibility =JavaVersion.VERSION_17
8
+
def projectFolder = project.buildFile.parentFile
9
+
def testingFolder = projectFolder.parentFile
10
+
11
+
if (testingFolder.name !='testing'|| projectFolder.name !='jni') {
12
+
thrownewGradleException("These projects are not to be used for robot projects. See README.md in the GradleRIO testing folder for the correct templates to use.")
13
+
}
14
+
15
+
java {
16
+
sourceCompatibility =JavaVersion.VERSION_11
17
+
targetCompatibility =JavaVersion.VERSION_11
18
+
}
10
19
11
20
defROBOT_MAIN_CLASS="frc.robot.Main"
12
21
13
22
// Define my targets (RoboRIO) and artifacts (deployable files)
14
23
// This is added by GradleRIO's backing project DeployUtils.
15
24
deploy {
16
25
targets {
17
-
roboRIO("roborio") {
26
+
roborio(getTargetTypeClass('RoboRIO')) {
18
27
// Team number is loaded either from the .wpilib/wpilib_preferences.json
19
28
// or from command line. If not found an exception will be thrown.
20
29
// You can use getTeamOrDefault(team) instead of getTeamNumber if you
21
30
// want to store a team number in this file.
22
31
team = frc.getTeamNumber()
23
-
}
24
-
}
25
-
artifacts {
26
-
frcJavaArtifact('frcJava') {
27
-
targets <<"roborio"
28
-
// Debug can be overridden by command line, for use with VSCode
29
-
debug = frc.getDebugOrDefault(false)
30
-
}
31
-
// Built in artifact to deploy arbitrary files to the roboRIO.
32
-
fileTreeArtifact('frcStaticFileDeploy') {
33
-
// The directory below is the local directory to deploy
34
-
files = fileTree(dir: 'src/main/deploy')
35
-
// Deploy to RoboRIO target, into /home/lvuser/deploy
0 commit comments