Update for 2023

This commit is contained in:
Thad House 2022-11-03 20:40:50 -07:00
parent d9f9982750
commit 6e9cde97e7
7 changed files with 43 additions and 33 deletions

View File

@ -3,7 +3,7 @@ plugins {
id 'java' id 'java'
id 'google-test' id 'google-test'
id 'edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin' version '2020.2' id 'edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin' version '2020.2'
id 'edu.wpi.first.NativeUtils' version '2022.8.1' id 'edu.wpi.first.NativeUtils' version '2023.6.0'
id 'edu.wpi.first.GradleJni' version '1.0.0' id 'edu.wpi.first.GradleJni' version '1.0.0'
id 'edu.wpi.first.GradleVsCode' version '1.3.0' id 'edu.wpi.first.GradleVsCode' version '1.3.0'
} }
@ -22,18 +22,18 @@ apply from: 'config.gradle'
// Apply Java configuration // Apply Java configuration
dependencies { dependencies {
implementation 'edu.wpi.first.cscore:cscore-java:2022.+' implementation 'edu.wpi.first.cscore:cscore-java:2023.+'
implementation 'edu.wpi.first.cameraserver:cameraserver-java:2022.+' implementation 'edu.wpi.first.cameraserver:cameraserver-java:2023.+'
implementation 'edu.wpi.first.ntcore:ntcore-java:2022.+' implementation 'edu.wpi.first.ntcore:ntcore-java:2023.+'
implementation 'edu.wpi.first.wpilibj:wpilibj-java:2022.+' implementation 'edu.wpi.first.wpilibj:wpilibj-java:2023.+'
implementation 'edu.wpi.first.wpiutil:wpiutil-java:2022.+' implementation 'edu.wpi.first.wpiutil:wpiutil-java:2023.+'
implementation 'edu.wpi.first.wpimath:wpimath-java:2022.+' implementation 'edu.wpi.first.wpimath:wpimath-java:2023.+'
implementation 'edu.wpi.first.hal:hal-java:2022.+' implementation 'edu.wpi.first.hal:hal-java:2023.+'
implementation "org.ejml:ejml-simple:0.41" implementation "org.ejml:ejml-simple:0.41"
implementation "com.fasterxml.jackson.core:jackson-annotations:2.12.4" implementation "com.fasterxml.jackson.core:jackson-annotations:2.12.4"
implementation "com.fasterxml.jackson.core:jackson-core:2.12.4" implementation "com.fasterxml.jackson.core:jackson-core:2.12.4"
implementation "com.fasterxml.jackson.core:jackson-databind:2.12.4" implementation "com.fasterxml.jackson.core:jackson-databind:2.12.4"
implementation 'edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:4.5.2-1' implementation 'edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:4.6.0-2'
} }
// Set up exports properly // Set up exports properly
@ -76,8 +76,8 @@ model {
javaCompileTasks << compileJava javaCompileTasks << compileJava
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.roborio) jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.roborio)
// Leave these for future proofing // Leave these for future proofing
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.raspbian) jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm32)
jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.aarch64bionic) jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm64)
sources { sources {
cpp { cpp {
source { source {
@ -125,5 +125,5 @@ model {
apply from: 'publish.gradle' apply from: 'publish.gradle'
wrapper { wrapper {
gradleVersion '7.3.3' gradleVersion '7.5.1'
} }

View File

@ -1,17 +1,17 @@
import org.gradle.internal.os.OperatingSystem import org.gradle.internal.os.OperatingSystem
nativeUtils.addWpiNativeUtils() nativeUtils.addWpiNativeUtils()
nativeUtils.withRoboRIO() nativeUtils.withCrossRoboRIO()
nativeUtils { nativeUtils {
wpi { wpi {
configureDependencies { configureDependencies {
wpiVersion = "2022.+" wpiVersion = "2023.+"
niLibVersion = "2022.2.3" niLibVersion = "2023.1.0"
opencvVersion = "4.5.2-1" opencvVersion = "4.6.0-2"
googleTestVersion = "1.9.0-5-437e100-1" googleTestVersion = "1.11.0-3"
imguiVersion = "1.86-1" imguiVersion = "1.88-8"
wpimathVersion = "2022.+" wpimathVersion = "2023.+"
} }
} }
} }

Binary file not shown.

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

16
gradlew vendored
View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright © 2015-2021 the original authors. # Copyright © 2015-2021 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.
@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script # Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features: # requires all of these POSIX shell features:
# * functions; # * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»; # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»; # * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit». # * various built-in commands including «command», «set», and «ulimit».
# #
# Important for patching: # Important for patching:
# #
@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \ org.gradle.wrapper.GradleWrapperMain \
"$@" "$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args. # Use "xargs" to parse quoted args.
# #
# With -n1 it outputs one arg per line, with the quotes and backslashes removed. # With -n1 it outputs one arg per line, with the quotes and backslashes removed.

10
gradlew.bat vendored
View File

@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -75,13 +75,15 @@ set CLASSPATH=%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
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@ -4,7 +4,7 @@ ext.licenseFile = files("$rootDir/LICENSE.txt")
def pubVersion = '0.0.1' def pubVersion = '0.0.1'
def outputsFolder = file("$buildDir/allOutputs") def outputsFolder = file("$buildDir/outputs")
def versionFile = file("$outputsFolder/version.txt") def versionFile = file("$outputsFolder/version.txt")
@ -28,7 +28,9 @@ task libraryBuild() {}
build.dependsOn outputVersions build.dependsOn outputVersions
task copyAllOutputs(type: Copy) { task copyAllOutputs(type: Copy) {
destinationDir outputsFolder destinationDir file("$buildDir/allOutputs")
from versionFile
dependsOn outputVersions
} }
build.dependsOn copyAllOutputs build.dependsOn copyAllOutputs