Skip to content

Commit

Permalink
Merge pull request #13 from REVrobotics/update-2023
Browse files Browse the repository at this point in the history
Update for wpilib 2023
  • Loading branch information
jfabellera authored Jan 24, 2023
2 parents 4534027 + 96aafb5 commit 3fb924e
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 32 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ roboRIO library for the [REV Robotics 2M Distance Sensor](http://www.revrobotics
Download the latest `REV-2m-Distance-Sensor-roboRIO-SDK-[version].zip` from the [release](https://github.com/REVrobotics/2m-Distance-Sensor/releases) tab and unzip it.

Inside `REV-2m-Distance-Sensor-roboRIO-SDK-[version]` there will be vendordeps and maven folders. Copy the file `REV2mDistanceSensor.json` under vendordeps to the frc vendordeps folder on your machine. It is typically located in the following places:
* Windows: C:\Users\Public\wpilib\2022\vendordeps
* Mac/Linux: ~/wpilib/2022/vendordeps
* Windows: C:\Users\Public\wpilib\2023\vendordeps
* Mac/Linux: ~/wpilib/2023/vendordeps

Next, merge the maven folder with the frc maven folder on your machine, typically located at:
* Windows: C:\Users\Public\wpilib\2022\maven
* Mac/Linux: ~/wpilib/2022/maven
* Windows: C:\Users\Public\wpilib\2023\maven
* Mac/Linux: ~/wpilib/2023/maven

In order to use these libraries in your robot code, open a project in VsCode.
* Press `Ctrl-Shift-P` to open the WPI commands window.
Expand Down
6 changes: 3 additions & 3 deletions Source/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ plugins {
id 'cpp'
id 'java'
id 'edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin' version '2020.2'
id 'edu.wpi.first.NativeUtils' version '2022.3.0'
id 'edu.wpi.first.NativeUtils' version '2023.11.1'
id 'edu.wpi.first.GradleJni' version '1.0.0'
id 'edu.wpi.first.GradleVsCode' version '1.0.0'
id 'edu.wpi.first.GradleVsCode' version '1.3.0'
id 'google-test-test-suite'
id "org.sonarqube" version "2.7"
}
Expand Down Expand Up @@ -89,5 +89,5 @@ javadoc {
apply from: 'publish.gradle'

wrapper {
gradleVersion = '7.2'
gradleVersion = '7.5.1'
}
12 changes: 6 additions & 6 deletions Source/config.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import org.gradle.internal.os.OperatingSystem

nativeUtils.addWpiNativeUtils()
nativeUtils.withRoboRIO()
nativeUtils.withCrossRoboRIO()

nativeUtils {
wpi {
configureDependencies {
wpiVersion = "2022.+"
wpimathVersion = "2022.+"
niLibVersion = "2022.2.2"
opencvVersion = "4.5.2-1"
googleTestVersion = "1.9.0-5-437e100-1"
wpiVersion = "2023.+"
wpimathVersion = "2023.+"
niLibVersion = "2023.3.0"
opencvVersion = "4.6.0-2"
googleTestVersion = "1.11.0-3"
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions Source/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
dependencies {
implementation 'edu.wpi.first.cscore:cscore-java:2022.+'
implementation 'edu.wpi.first.cameraserver:cameraserver-java:2022.+'
implementation 'edu.wpi.first.ntcore:ntcore-java:2022.+'
implementation 'edu.wpi.first.wpilibj:wpilibj-java:2022.+'
implementation 'edu.wpi.first.wpiutil:wpiutil-java:2022.+'
implementation 'edu.wpi.first.hal:hal-java:2022.+'
implementation 'edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:4.5.2-1'
implementation 'edu.wpi.first.cscore:cscore-java:2023.+'
implementation 'edu.wpi.first.cameraserver:cameraserver-java:2023.+'
implementation 'edu.wpi.first.ntcore:ntcore-java:2023.+'
implementation 'edu.wpi.first.wpilibj:wpilibj-java:2023.+'
implementation 'edu.wpi.first.wpiutil:wpiutil-java:2023.+'
implementation 'edu.wpi.first.hal:hal-java:2023.+'
implementation 'edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:4.6.0-2'
testImplementation(platform('org.junit:junit-bom:5.7.0'))
testImplementation('org.junit.jupiter:junit-jupiter')
}
Binary file modified Source/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion Source/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
16 changes: 11 additions & 5 deletions Source/gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
Expand Down Expand Up @@ -205,6 +205,12 @@ set -- \
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.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions Source/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down

0 comments on commit 3fb924e

Please sign in to comment.