[build] Switch to classpath based developerRobot deploy (#9000)

Matches the gradlerio change.
This commit is contained in:
Thad House
2026-06-23 07:23:20 -07:00
committed by GitHub
parent cc1c11c903
commit cd17feaa40
2 changed files with 10 additions and 5 deletions

View File

@@ -68,6 +68,7 @@ tasks.withType(JavaExec).configureEach {
'java.base/jdk.internal.vm=ALL-UNNAMED',
'--add-opens',
'java.base/java.lang=ALL-UNNAMED',
"--enable-native-access=ALL-UNNAMED",
]
}
@@ -76,6 +77,7 @@ tasks.withType(com.github.spotbugs.snom.SpotBugsTask).configureEach {
}
def simProjects = ['halsim_gui']
def projectJarTask = jar
deploy {
targets {
@@ -139,10 +141,13 @@ deploy {
excludes.add('**/*.so.*.debug')
}
developerRobotJava(JavaArtifact) {
jarTask = shadowJar
developerRobotJava(JavaClasspathArtifact) {
it.directory = "wpilib/allwpilibclasspath"
it.deleteOldFiles = true
it.setJar(projectJarTask)
it.setConfiguration(configurations.runtimeClasspath)
postdeploy << { ctx ->
ctx.execute("echo '/usr/bin/java -XX:+UseG1GC -Djava.library.path=/home/systemcore/wpilib/third-party/lib -jar /home/systemcore/developerRobot-all.jar' > /home/systemcore/robotCommand")
ctx.execute("echo '/usr/bin/java -XX:+UseG1GC -Djava.library.path=/home/systemcore/wpilib/third-party/lib --add-opens java.base/jdk.internal.vm=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --enable-native-access=ALL-UNNAMED -cp \"/home/systemcore/wpilib/allwpilibclasspath/*\" wpilib.robot.Main' > /home/systemcore/robotCommand")
ctx.execute("chmod +x /home/systemcore/robotCommand; chown systemcore /home/systemcore/robotCommand")
}
}

View File

@@ -26,7 +26,7 @@ mockito-core = { module = "org.mockito:mockito-core", version = "4.1.0" }
# Note that these are also Gradle plugins and cannot be used with the plugin specification
# due to their presence on the classpath without version information.
wpilib-gradle-vscode = { module = "org.wpilib:gradle-cpp-vscode", version = "2027.0.0" }
wpilib-native-utils = { module = "org.wpilib:native-utils", version = "2027.8.2" }
wpilib-native-utils = { module = "org.wpilib:native-utils", version = "2027.10.0" }
[bundles]
ejml = ["ejml-simple"]
@@ -45,6 +45,6 @@ wpilib-gradle-jni = { id = "org.wpilib.GradleJni", version = "2027.0.0" }
# Note: these plugins can't be used. Their JARs are on the classpath for buildSrc,
# which doesn't retain version information.
# wpilib-gradle-vscode = { id = "org.wpilib.GradleVsCode", version = "2027.0.0" }
# wpilib-native-utils = { id = "org.wpilib.NativeUtils", version = "2027.8.2" }
# wpilib-native-utils = { id = "org.wpilib.NativeUtils", version = "2027.10.0" }
wpilib-repositories = { id = "org.wpilib.WPILibRepositoriesPlugin", version = "2027.0.0" }
wpilib-versioning = { id = "org.wpilib.WPILibVersioningPlugin", version = "2027.0.1" }