[build] Update to gradle 9.2.0, use new reorged plugins (#8471)

This commit is contained in:
Thad House
2025-12-13 21:44:00 -08:00
committed by GitHub
parent bcb5c5c16c
commit af0a3e9c2f
37 changed files with 87 additions and 178 deletions

View File

@@ -22,9 +22,6 @@ jobs:
- container: wpilib/systemcore-cross-ubuntu:2027-24.04 - container: wpilib/systemcore-cross-ubuntu:2027-24.04
artifact-name: Systemcore artifact-name: Systemcore
build-options: "-Ponlylinuxsystemcore" build-options: "-Ponlylinuxsystemcore"
- container: wpilib/raspbian-cross-ubuntu:2027-bookworm-24.04
artifact-name: Arm32
build-options: "-Ponlylinuxarm32"
- container: wpilib/aarch64-cross-ubuntu:2027-bookworm-24.04 - container: wpilib/aarch64-cross-ubuntu:2027-bookworm-24.04
artifact-name: Arm64 artifact-name: Arm64
build-options: "-Ponlylinuxarm64" build-options: "-Ponlylinuxarm64"

View File

@@ -26,9 +26,6 @@ jobs:
- container: wpilib/systemcore-cross-ubuntu:2027-24.04 - container: wpilib/systemcore-cross-ubuntu:2027-24.04
artifact-name: Systemcore artifact-name: Systemcore
build-options: "-Ponlylinuxsystemcore" build-options: "-Ponlylinuxsystemcore"
- container: wpilib/raspbian-cross-ubuntu:2027-bookworm-24.04
artifact-name: Arm32
build-options: "-Ponlylinuxarm32"
- container: wpilib/aarch64-cross-ubuntu:2027-bookworm-24.04 - container: wpilib/aarch64-cross-ubuntu:2027-bookworm-24.04
artifact-name: Arm64 artifact-name: Arm64
build-options: "-Ponlylinuxarm64" build-options: "-Ponlylinuxarm64"

View File

@@ -1,6 +1,6 @@
import edu.wpi.first.deployutils.deploy.target.RemoteTarget import org.wpilib.deployutils.deploy.target.RemoteTarget
import edu.wpi.first.deployutils.deploy.target.location.SshDeployLocation import org.wpilib.deployutils.deploy.target.location.SshDeployLocation
import edu.wpi.first.deployutils.deploy.artifact.* import org.wpilib.deployutils.deploy.artifact.*
import org.gradle.internal.os.OperatingSystem import org.gradle.internal.os.OperatingSystem
plugins { plugins {
@@ -10,8 +10,8 @@ plugins {
id 'visual-studio' id 'visual-studio'
} }
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
apply plugin: 'edu.wpi.first.DeployUtils' apply plugin: 'org.wpilib.DeployUtils'
apply from: "${rootDir}/shared/config.gradle" apply from: "${rootDir}/shared/config.gradle"
@@ -67,33 +67,33 @@ tasks.withType(com.github.spotbugs.snom.SpotBugsTask).configureEach {
deploy { deploy {
targets { targets {
roborio(RemoteTarget) { systemcore(RemoteTarget) {
directory = '/home/lvuser' directory = '/home/systemcore'
maxChannels = 4 maxChannels = 4
locations { locations {
ssh(SshDeployLocation) { mdns(SshDeployLocation) {
address = "172.22.11.2" address = "robot.local"
user = 'admin' user = 'systemcore'
password = '' password = 'systemcore'
ipv6 = false
}
usb(SshDeployLocation) {
address = "172.26.0.1"
user = 'systemcore'
password = 'systemcore'
ipv6 = false ipv6 = false
} }
} }
def remote = it timeout = 7
artifacts.registerFactory(WPIJREArtifact) { def remote = it
return objects.newInstance(WPIJREArtifact, it, remote)
}
artifacts { artifacts {
all { all {
predeploy << { ctx ->
ctx.execute('. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t 2> /dev/null')
ctx.execute("sed -i -e 's/\"exec /\"/' /usr/local/frc/bin/frcRunRobot.sh")
}
postdeploy << { ctx -> postdeploy << { ctx ->
ctx.execute("sync") ctx.execute("sync")
ctx.execute("ldconfig") ctx.execute("sudo ldconfig /home/systemcore/frc/third-party/lib")
} }
} }
@@ -127,9 +127,6 @@ deploy {
excludes.add('**/*.so.*.debug') excludes.add('**/*.so.*.debug')
} }
jre(WPIJREArtifact) {
}
benchmarkJava(JavaArtifact) { benchmarkJava(JavaArtifact) {
jarTask = shadowJar jarTask = shadowJar
postdeploy << { ctx -> postdeploy << { ctx ->
@@ -157,23 +154,23 @@ eclipse {
tasks.register('deployJava') { tasks.register('deployJava') {
try { try {
dependsOn tasks.named('deployjreroborio') dependsOn tasks.named('deployjresystemcore')
dependsOn tasks.named('deploybenchmarkJavaroborio') dependsOn tasks.named('deploybenchmarkJavasystemcore')
dependsOn tasks.named('deploybenchmarkCppJavaroborio') // Deploying shared C++ is how to get the Java shared libraries. dependsOn tasks.named('deploybenchmarkCppJavasystemcore') // Deploying shared C++ is how to get the Java shared libraries.
} catch (ignored) { } catch (ignored) {
} }
} }
tasks.register('deployShared') { tasks.register('deployShared') {
try { try {
dependsOn tasks.named('deploybenchmarkCpproborio') dependsOn tasks.named('deploybenchmarkCppsystemcore')
} catch (ignored) { } catch (ignored) {
} }
} }
tasks.register('deployStatic') { tasks.register('deployStatic') {
try { try {
dependsOn tasks.named('deploybenchmarkCppStaticroborio') dependsOn tasks.named('deploybenchmarkCppStaticsystemcore')
} catch (ignored) { } catch (ignored) {
} }
} }
@@ -206,10 +203,10 @@ model {
} }
} }
binaries.all { binary -> binaries.all { binary ->
if (binary.targetPlatform.name == nativeUtils.wpi.platforms.roborio) { if (binary.targetPlatform.name == nativeUtils.wpi.platforms.systemcore) {
if (binary.buildType.name == 'debug') { if (binary.buildType.name == 'debug') {
deploy.targets.roborio.artifacts.benchmarkCpp.binary = binary deploy.targets.systemcore.artifacts.benchmarkCpp.binary = binary
deploy.targets.roborio.artifacts.benchmarkCppJava.binary = binary deploy.targets.systemcore.artifacts.benchmarkCppJava.binary = binary
} }
} }
lib project: ':apriltag', library: 'apriltag', linkage: 'shared' lib project: ':apriltag', library: 'apriltag', linkage: 'shared'
@@ -228,9 +225,6 @@ model {
lib project: ':wpinet', library: 'wpinetJNIShared', linkage: 'shared' lib project: ':wpinet', library: 'wpinetJNIShared', linkage: 'shared'
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared' lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
lib project: ':wpiutil', library: 'wpiutilJNIShared', linkage: 'shared' lib project: ':wpiutil', library: 'wpiutilJNIShared', linkage: 'shared'
if (binary.targetPlatform.name == nativeUtils.wpi.platforms.roborio) {
nativeUtils.useRequiredLibrary(binary, 'ni_link_libraries', 'ni_runtime_libraries')
}
if (binary.targetPlatform.operatingSystem.isWindows()) { if (binary.targetPlatform.operatingSystem.isWindows()) {
// Shlwapi.lib is needed for SHGetValueA() inside thirdparty benchmark // Shlwapi.lib is needed for SHGetValueA() inside thirdparty benchmark
binary.linker.args << "Shlwapi.lib" binary.linker.args << "Shlwapi.lib"
@@ -265,9 +259,9 @@ model {
} }
} }
binaries.all { binary -> binaries.all { binary ->
if (binary.targetPlatform.name == nativeUtils.wpi.platforms.roborio) { if (binary.targetPlatform.name == nativeUtils.wpi.platforms.systemcore) {
if (binary.buildType.name == 'debug') { if (binary.buildType.name == 'debug') {
deploy.targets.roborio.artifacts.benchmarkCppStatic.binary = binary deploy.targets.systemcore.artifacts.benchmarkCppStatic.binary = binary
} }
} }
lib project: ':apriltag', library: 'apriltag', linkage: 'static' lib project: ':apriltag', library: 'apriltag', linkage: 'static'
@@ -280,9 +274,6 @@ model {
lib project: ':wpimath', library: 'wpimath', linkage: 'static' lib project: ':wpimath', library: 'wpimath', linkage: 'static'
lib project: ':wpinet', library: 'wpinet', linkage: 'static' lib project: ':wpinet', library: 'wpinet', linkage: 'static'
lib project: ':wpiutil', library: 'wpiutil', linkage: 'static' lib project: ':wpiutil', library: 'wpiutil', linkage: 'static'
if (binary.targetPlatform.name == nativeUtils.wpi.platforms.roborio) {
nativeUtils.useRequiredLibrary(binary, 'ni_link_libraries', 'ni_runtime_libraries')
}
if (binary.targetPlatform.operatingSystem.isWindows()) { if (binary.targetPlatform.operatingSystem.isWindows()) {
// Shlwapi.lib is needed for SHGetValueA() inside thirdparty benchmark // Shlwapi.lib is needed for SHGetValueA() inside thirdparty benchmark
binary.linker.args << "Shlwapi.lib" binary.linker.args << "Shlwapi.lib"
@@ -327,14 +318,14 @@ model {
} }
installAthena(Task) { installAthena(Task) {
$.binaries.each { $.binaries.each {
if (it in NativeExecutableBinarySpec && it.targetPlatform.name == nativeUtils.wpi.platforms.roborio && it.component.name == 'benchmarkCpp') { if (it in NativeExecutableBinarySpec && it.targetPlatform.name == nativeUtils.wpi.platforms.systemcore && it.component.name == 'benchmarkCpp') {
dependsOn it.tasks.install dependsOn it.tasks.install
} }
} }
} }
installAthenaStatic(Task) { installAthenaStatic(Task) {
$.binaries.each { $.binaries.each {
if (it in NativeExecutableBinarySpec && it.targetPlatform.name == nativeUtils.wpi.platforms.roborio && it.component.name == 'benchmarkCppStatic') { if (it in NativeExecutableBinarySpec && it.targetPlatform.name == nativeUtils.wpi.platforms.systemcore && it.component.name == 'benchmarkCppStatic') {
dependsOn it.tasks.install dependsOn it.tasks.install
} }
} }

View File

@@ -1,4 +1,4 @@
import edu.wpi.first.toolchain.* import org.wpilib.toolchain.*
buildscript { buildscript {
repositories { repositories {
@@ -10,11 +10,11 @@ buildscript {
plugins { plugins {
id 'base' id 'base'
id 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin' version '2023.0.1' id 'org.wpilib.WPILibVersioningPlugin' version '2027.0.0'
id 'edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin' version '2025.0' id 'org.wpilib.WPILibRepositoriesPlugin' version '2027.0.0'
id 'edu.wpi.first.NativeUtils' apply false id 'org.wpilib.NativeUtils' apply false
id 'edu.wpi.first.GradleJni' version '1.2.0' id 'org.wpilib.GradleJni' version '2027.0.0'
id 'edu.wpi.first.GradleVsCode' id 'org.wpilib.GradleVsCode'
id 'idea' id 'idea'
id 'visual-studio' id 'visual-studio'
id 'net.ltgt.errorprone' version '4.3.0' apply false id 'net.ltgt.errorprone' version '4.3.0' apply false
@@ -38,6 +38,9 @@ allprojects {
} else { } else {
wpilibRepositories.addAllDevelopmentRepositories(it) wpilibRepositories.addAllDevelopmentRepositories(it)
} }
tasks.withType(AbstractTestTask).configureEach {
failOnNoDiscoveredTests = false
}
} }
develocity { develocity {
@@ -171,5 +174,5 @@ ext.getCurrentArch = {
} }
wrapper { wrapper {
gradleVersion = '8.14.3' gradleVersion = '9.2.0'
} }

View File

@@ -9,5 +9,5 @@ repositories {
} }
} }
dependencies { dependencies {
implementation "edu.wpi.first:native-utils:2026.0.0" implementation "org.wpilib:native-utils:2027.1.1"
} }

View File

@@ -9,7 +9,7 @@ import org.gradle.language.base.internal.ProjectLayout;
import org.gradle.language.base.plugins.ComponentModelBasePlugin; import org.gradle.language.base.plugins.ComponentModelBasePlugin;
import org.gradle.language.nativeplatform.tasks.AbstractNativeSourceCompileTask; import org.gradle.language.nativeplatform.tasks.AbstractNativeSourceCompileTask;
import org.gradle.model.ModelMap; import org.gradle.model.ModelMap;
import edu.wpi.first.toolchain.ToolchainExtension import org.wpilib.toolchain.ToolchainExtension
import org.gradle.model.Mutate; import org.gradle.model.Mutate;
import org.gradle.api.plugins.ExtensionContainer; import org.gradle.api.plugins.ExtensionContainer;
import org.gradle.nativeplatform.test.googletest.GoogleTestTestSuiteBinarySpec; import org.gradle.nativeplatform.test.googletest.GoogleTestTestSuiteBinarySpec;

View File

@@ -10,7 +10,7 @@ import org.gradle.language.base.plugins.ComponentModelBasePlugin;
import org.gradle.language.nativeplatform.tasks.AbstractNativeSourceCompileTask; import org.gradle.language.nativeplatform.tasks.AbstractNativeSourceCompileTask;
import org.gradle.model.ModelMap; import org.gradle.model.ModelMap;
import org.gradle.internal.os.OperatingSystem import org.gradle.internal.os.OperatingSystem
import edu.wpi.first.toolchain.ToolchainExtension import org.wpilib.toolchain.ToolchainExtension
import org.gradle.model.Mutate; import org.gradle.model.Mutate;
import org.gradle.api.plugins.ExtensionContainer; import org.gradle.api.plugins.ExtensionContainer;
import org.gradle.nativeplatform.test.googletest.GoogleTestTestSuiteBinarySpec; import org.gradle.nativeplatform.test.googletest.GoogleTestTestSuiteBinarySpec;

View File

@@ -46,7 +46,7 @@ import org.gradle.platform.base.ComponentType;
import org.gradle.platform.base.TypeBuilder; import org.gradle.platform.base.TypeBuilder;
import org.gradle.nativeplatform.tasks.ObjectFilesToBinary; import org.gradle.nativeplatform.tasks.ObjectFilesToBinary;
import groovy.transform.CompileStatic; import groovy.transform.CompileStatic;
import edu.wpi.first.nativeutils.exports.ExportsGenerationTask import org.wpilib.nativeutils.exports.ExportsGenerationTask
@CompileStatic @CompileStatic
class SingleNativeBuild implements Plugin<Project> { class SingleNativeBuild implements Plugin<Project> {

View File

@@ -1,77 +0,0 @@
import groovy.transform.CompileStatic;
import javax.inject.Inject;
import org.gradle.api.Project;
import edu.wpi.first.deployutils.deploy.CommandDeployResult;
import edu.wpi.first.deployutils.deploy.artifact.MavenArtifact;
import edu.wpi.first.deployutils.deploy.context.DeployContext;
import edu.wpi.first.deployutils.deploy.target.RemoteTarget;
import edu.wpi.first.deployutils.PredicateWrapper;
import edu.wpi.first.deployutils.ActionWrapper;
@CompileStatic
public class WPIJREArtifact extends MavenArtifact {
private final String configName;
public String getConfigName() {
return configName;
}
public boolean isCheckJreVersion() {
return checkJreVersion;
}
public void setCheckJreVersion(boolean checkJreVersion) {
this.checkJreVersion = checkJreVersion;
}
private boolean checkJreVersion = true;
private final String artifactLocation = "edu.wpi.first.jdk:roborio-2024:17.0.9u7-3"
@Inject
public WPIJREArtifact(String name, RemoteTarget target) {
super(name, target);
String configName = name + "frcjre";
this.configName = configName;
Project project = target.getProject();
getConfiguration().set(project.getConfigurations().create(configName));
getDependency().set(project.getDependencies().add(configName, artifactLocation));
setOnlyIf(new PredicateWrapper({ DeployContext ctx ->
return jreMissing(ctx) || jreOutOfDate(ctx) || project.hasProperty("force-redeploy-jre");
}));
getDirectory().set("/tmp");
getFilename().set("frcjre.ipk");
getPostdeploy().add(new ActionWrapper({ DeployContext ctx ->
ctx.getLogger().log("Installing JRE...");
ctx.execute("opkg remove frc*-openjdk*; opkg install /tmp/frcjre.ipk; rm /tmp/frcjre.ipk");
ctx.getLogger().log("JRE Deployed!");
}));
}
private boolean jreMissing(DeployContext ctx) {
return ctx.execute("if [[ -f \"/usr/local/frc/JRE/bin/java\" ]]; then echo OK; else echo MISSING; fi").getResult().contains("MISSING");
}
private boolean jreOutOfDate(DeployContext ctx) {
if (!checkJreVersion) {
return false;
}
String version = getDependency().get().getVersion();
CommandDeployResult cmdResult = ctx.execute("opkg list-installed | grep openjdk");
if (cmdResult.getExitCode() != 0) {
ctx.getLogger().log("JRE not found");
return false;
}
String result = cmdResult.getResult().trim();
ctx.getLogger().log("Searching for JRE " + version);
ctx.getLogger().log("Found JRE " + result);
boolean matches = result.contains(version);
ctx.getLogger().log(matches ? "JRE Is Correct Version" : "JRE is mismatched. Reinstalling");
return !matches;
}
}

View File

@@ -5,7 +5,7 @@ plugins {
id 'visual-studio' id 'visual-studio'
} }
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
apply from: "${rootDir}/shared/config.gradle" apply from: "${rootDir}/shared/config.gradle"

View File

@@ -23,7 +23,6 @@ model {
enableCheckTask true enableCheckTask true
javaCompileTasks << compileJava javaCompileTasks << compileJava
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.systemcore) jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.systemcore)
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm32)
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm64) jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm64)
sources { sources {

View File

@@ -1,6 +1,6 @@
import edu.wpi.first.deployutils.deploy.target.RemoteTarget import org.wpilib.deployutils.deploy.target.RemoteTarget
import edu.wpi.first.deployutils.deploy.target.location.SshDeployLocation import org.wpilib.deployutils.deploy.target.location.SshDeployLocation
import edu.wpi.first.deployutils.deploy.artifact.* import org.wpilib.deployutils.deploy.artifact.*
import org.gradle.internal.os.OperatingSystem import org.gradle.internal.os.OperatingSystem
plugins { plugins {
@@ -10,8 +10,8 @@ plugins {
id 'visual-studio' id 'visual-studio'
} }
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
apply plugin: 'edu.wpi.first.DeployUtils' apply plugin: 'org.wpilib.DeployUtils'
apply from: "${rootDir}/shared/config.gradle" apply from: "${rootDir}/shared/config.gradle"
@@ -78,7 +78,7 @@ deploy {
ipv6 = false ipv6 = false
} }
usb(SshDeployLocation) { usb(SshDeployLocation) {
address = "172.28.0.1" address = "172.26.0.1"
user = 'systemcore' user = 'systemcore'
password = 'systemcore' password = 'systemcore'
ipv6 = false ipv6 = false

View File

@@ -7,7 +7,7 @@ if (project.hasProperty('onlylinuxathena') || project.hasProperty('onlylinuxsyst
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
if (OperatingSystem.current().isWindows()) { if (OperatingSystem.current().isWindows()) {
apply plugin: 'windows-resources' apply plugin: 'windows-resources'

View File

@@ -8,7 +8,7 @@ description = "A different kind of dashboard"
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
if (OperatingSystem.current().isWindows()) { if (OperatingSystem.current().isWindows()) {
apply plugin: 'windows-resources' apply plugin: 'windows-resources'

Binary file not shown.

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

5
gradlew vendored
View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright © 2015-2021 the original authors. # Copyright © 2015 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -114,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;; NONSTOP* ) nonstop=true ;;
esac esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java # For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" ) JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@" "$@"

3
gradlew.bat vendored
View File

@@ -70,11 +70,10 @@ goto fail
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell

View File

@@ -6,7 +6,7 @@ plugins {
id 'maven-publish' id 'maven-publish'
} }
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
apply from: '../shared/config.gradle' apply from: '../shared/config.gradle'

View File

@@ -7,7 +7,6 @@ if (project.hasProperty('ciDebugOnly')) {
} }
nativeUtils.addWpiNativeUtils() nativeUtils.addWpiNativeUtils()
nativeUtils.withCrossLinuxArm32()
nativeUtils.withCrossLinuxArm64() nativeUtils.withCrossLinuxArm64()
nativeUtils.withCrossSystemCore() nativeUtils.withCrossSystemCore()
nativeUtils { nativeUtils {
@@ -19,6 +18,14 @@ nativeUtils {
} }
} }
if (project.hasProperty('onlylinuxarm64')) {
nativeUtils.crossCompilers.getByName(org.wpilib.toolchain.NativePlatforms.linuxarm64).optional = false
}
if (project.hasProperty('onlylinuxsystemcore')) {
nativeUtils.crossCompilers.getByName(org.wpilib.toolchain.NativePlatforms.systemcore).optional = false
}
nativeUtils.wpi.addWarnings() nativeUtils.wpi.addWarnings()
nativeUtils.wpi.addWarningsAsErrors() nativeUtils.wpi.addWarningsAsErrors()
@@ -49,7 +56,7 @@ nativeUtils.platformConfigs.each {
} }
} }
nativeUtils.platformConfigs.linuxathena.linker.args.add("-Wl,--fatal-warnings") nativeUtils.platformConfigs.linuxsystemcore.linker.args.add("-Wl,--fatal-warnings")
if (project.hasProperty('ntcoreffibuild')) { if (project.hasProperty('ntcoreffibuild')) {
// On windows, for ntcoreffi, use static runtime // On windows, for ntcoreffi, use static runtime

View File

@@ -1,7 +1,7 @@
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'google-test-test-suite' apply plugin: 'google-test-test-suite'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
apply plugin: SingleNativeBuild apply plugin: SingleNativeBuild
apply plugin: ExtraTasks apply plugin: ExtraTasks

View File

@@ -1,8 +1,8 @@
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'google-test-test-suite' apply plugin: 'google-test-test-suite'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
apply plugin: 'edu.wpi.first.GradleJni' apply plugin: 'org.wpilib.GradleJni'
apply plugin: SingleNativeBuild apply plugin: SingleNativeBuild
apply plugin: ExtraTasks apply plugin: ExtraTasks
@@ -112,7 +112,6 @@ model {
enableCheckTask !project.hasProperty('skipJniCheck') enableCheckTask !project.hasProperty('skipJniCheck')
javaCompileTasks << compileJava javaCompileTasks << compileJava
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.systemcore) jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.systemcore)
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm32)
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm64) jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm64)
sources { sources {
cpp { cpp {

View File

@@ -1,5 +1,5 @@
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
apply plugin: ExtraTasks apply plugin: ExtraTasks
if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxsystemcore')) { if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxsystemcore')) {

View File

@@ -3,7 +3,7 @@ if (project.hasProperty('onlylinuxathena') || project.hasProperty('onlylinuxsyst
} }
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
apply plugin: ExtraTasks apply plugin: ExtraTasks
description = "Core library for WebSocket extensions" description = "Core library for WebSocket extensions"

View File

@@ -1,6 +1,6 @@
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
ext { ext {
nativeName = 'catch2' nativeName = 'catch2'

View File

@@ -2,7 +2,7 @@
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
ext { ext {
nativeName = 'googletest' nativeName = 'googletest'

View File

@@ -7,7 +7,7 @@ if (project.hasProperty('onlylinuxathena') || project.hasProperty('onlylinuxsyst
apply plugin: 'c' apply plugin: 'c'
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
if (OperatingSystem.current().isMacOsX()) { if (OperatingSystem.current().isMacOsX()) {
apply plugin: 'objective-c' apply plugin: 'objective-c'

View File

@@ -8,7 +8,7 @@ description = "A tool to download datalogs from a roborio"
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
if (OperatingSystem.current().isWindows()) { if (OperatingSystem.current().isWindows()) {
apply plugin: 'windows-resources' apply plugin: 'windows-resources'

View File

@@ -8,7 +8,7 @@ description = "NetworkTables Viewer"
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
if (OperatingSystem.current().isWindows()) { if (OperatingSystem.current().isWindows()) {
apply plugin: 'windows-resources' apply plugin: 'windows-resources'

View File

@@ -9,7 +9,7 @@ description = "Process Starter"
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'objective-cpp' apply plugin: 'objective-cpp'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
ext { ext {
nativeName = 'processstarter' nativeName = 'processstarter'

View File

@@ -9,7 +9,7 @@ description = 'System identification for robot mechanisms'
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'google-test-test-suite' apply plugin: 'google-test-test-suite'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
if (OperatingSystem.current().isWindows()) { if (OperatingSystem.current().isWindows()) {
apply plugin: 'windows-resources' apply plugin: 'windows-resources'

View File

@@ -10,7 +10,7 @@ apply plugin: 'c'
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'google-test-test-suite' apply plugin: 'google-test-test-suite'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
if (OperatingSystem.current().isWindows()) { if (OperatingSystem.current().isWindows()) {
apply plugin: 'windows-resources' apply plugin: 'windows-resources'

View File

@@ -9,7 +9,7 @@ if (OperatingSystem.current().isMacOsX()) {
apply plugin: 'objective-cpp' apply plugin: 'objective-cpp'
} }
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
ext { ext {
nativeName = 'wpigui' nativeName = 'wpigui'

View File

@@ -2,7 +2,7 @@ apply plugin: 'cpp'
apply plugin: 'c' apply plugin: 'c'
apply plugin: 'google-test-test-suite' apply plugin: 'google-test-test-suite'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
apply plugin: SingleNativeBuild apply plugin: SingleNativeBuild
apply plugin: ExtraTasks apply plugin: ExtraTasks

View File

@@ -4,7 +4,7 @@ apply plugin: 'cpp'
apply plugin: 'c' apply plugin: 'c'
apply plugin: 'google-test-test-suite' apply plugin: 'google-test-test-suite'
apply plugin: 'visual-studio' apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
apply plugin: ExtraTasks apply plugin: ExtraTasks
evaluationDependsOn(':hal') evaluationDependsOn(':hal')
@@ -199,9 +199,6 @@ model {
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared' lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
lib project: ':wpinet', library: 'wpinet', linkage: 'shared' lib project: ':wpinet', library: 'wpinet', linkage: 'shared'
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared' lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
if (binary.targetPlatform.name == nativeUtils.wpi.platforms.roborio) {
nativeUtils.useRequiredLibrary(binary, 'ni_link_libraries', 'ni_runtime_libraries')
}
if (binary.targetPlatform.name == getCurrentArch()) { if (binary.targetPlatform.name == getCurrentArch()) {
simModules.each { simModules.each {
lib project: ":simulation:$it", library: it, linkage: 'shared' lib project: ":simulation:$it", library: it, linkage: 'shared'

View File

@@ -76,7 +76,7 @@ dependencies {
} }
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
apply plugin: ExtraTasks apply plugin: ExtraTasks
apply from: "${rootDir}/shared/config.gradle" apply from: "${rootDir}/shared/config.gradle"

View File

@@ -1,4 +1,4 @@
import edu.wpi.first.toolchain.NativePlatforms import org.wpilib.toolchain.NativePlatforms
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'jacoco' apply plugin: 'jacoco'
@@ -93,7 +93,7 @@ ext {
} }
apply plugin: 'cpp' apply plugin: 'cpp'
apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'org.wpilib.NativeUtils'
apply from: '../shared/config.gradle' apply from: '../shared/config.gradle'