From 99f611ae0ef37bba1d6d604001cac420e40b1031 Mon Sep 17 00:00:00 2001 From: itsmeft24 <57544858+itsmeft24@users.noreply.github.com> Date: Mon, 1 Jan 2024 19:38:24 -0500 Subject: [PATCH] Update to WPILib 2024 Beta --- build.gradle | 29 ++++++++++--------- config.gradle | 9 +++--- publish.gradle | 2 +- .../stormkit/command/StatefulSubsystem.java | 4 +-- vendordeps/WPILibNewCommands.json | 6 ++-- 5 files changed, 26 insertions(+), 24 deletions(-) diff --git a/build.gradle b/build.gradle index c14062a..03cecac 100644 --- a/build.gradle +++ b/build.gradle @@ -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 '2023.11.1' - id 'edu.wpi.first.GradleJni' version '1.0.0' - id 'edu.wpi.first.GradleVsCode' version '1.3.0' + id 'edu.wpi.first.NativeUtils' version '2024.6.1' + id 'edu.wpi.first.GradleJni' version '1.1.0' + id 'edu.wpi.first.GradleVsCode' version '2.1.0' } repositories { @@ -21,19 +21,20 @@ apply from: 'config.gradle' // Apply Java configuration dependencies { - 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.wpimath:wpimath-java:2023.+' - implementation 'edu.wpi.first.wpilibNewCommands:wpilibNewCommands-java:2023.+' - implementation 'edu.wpi.first.hal:hal-java:2023.+' - implementation "org.ejml:ejml-simple:0.41" + implementation 'edu.wpi.first.cscore:cscore-java:2024.+' + implementation 'edu.wpi.first.cameraserver:cameraserver-java:2024.+' + implementation 'edu.wpi.first.ntcore:ntcore-java:2024.+' + implementation 'edu.wpi.first.wpilibj:wpilibj-java:2024.+' + implementation 'edu.wpi.first.wpiutil:wpiutil-java:2024.+' + implementation 'edu.wpi.first.wpimath:wpimath-java:2024.+' + implementation 'edu.wpi.first.wpilibNewCommands:wpilibNewCommands-java:2024.+' + implementation 'edu.wpi.first.wpiunits:wpiunits-java:2024.+' + implementation 'edu.wpi.first.hal:hal-java:2024.+' + implementation "org.ejml:ejml-simple:0.43.1" 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-databind:2.12.4" - implementation 'edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:4.6.0-2' + implementation 'edu.wpi.first.thirdparty.frc2024.opencv:opencv-java:4.8.0-2' } // Set up exports properly @@ -67,5 +68,5 @@ model { apply from: 'publish.gradle' wrapper { - gradleVersion '7.5.1' + gradleVersion '8.4' } diff --git a/config.gradle b/config.gradle index 88a8c3f..871ea48 100644 --- a/config.gradle +++ b/config.gradle @@ -6,10 +6,11 @@ nativeUtils.withCrossRoboRIO() nativeUtils { wpi { configureDependencies { - wpiVersion = "2023.+" - niLibVersion = "2023.3.0" - opencvVersion = "4.6.0-3" - wpimathVersion = "2023.+" + wpiVersion = "2024.+" + opencvYear = "frc2024" + niLibVersion = "2024.2.1" + opencvVersion = "4.8.0-2" + wpimathVersion = "2024.+" } } } diff --git a/publish.gradle b/publish.gradle index df2bc84..4c971b9 100644 --- a/publish.gradle +++ b/publish.gradle @@ -2,7 +2,7 @@ apply plugin: 'maven-publish' ext.licenseFile = files("$rootDir/LICENSE.txt") -def pubVersion = '0.0.1' +def pubVersion = '0.1.0' def outputsFolder = file("$buildDir/outputs") diff --git a/src/main/java/com/redstorm509/stormkit/command/StatefulSubsystem.java b/src/main/java/com/redstorm509/stormkit/command/StatefulSubsystem.java index 680187a..1ab97d4 100644 --- a/src/main/java/com/redstorm509/stormkit/command/StatefulSubsystem.java +++ b/src/main/java/com/redstorm509/stormkit/command/StatefulSubsystem.java @@ -1,13 +1,13 @@ package com.redstorm509.stormkit.command; import edu.wpi.first.wpilibj.DriverStation; -import edu.wpi.first.wpilibj2.command.Subsystem; +import edu.wpi.first.wpilibj2.command.SubsystemBase; /** * An alternative way of organizing subsystem-specific code. * This generic class takes in an enum that represents the state of the subsytem, and provides interfaces for triggering code when states are entered and exited. */ -public abstract class StatefulSubsystem> extends Subsystem { +public abstract class StatefulSubsystem> extends SubsystemBase { protected T currentState; /** diff --git a/vendordeps/WPILibNewCommands.json b/vendordeps/WPILibNewCommands.json index 6d08e61..8ece11d 100644 --- a/vendordeps/WPILibNewCommands.json +++ b/vendordeps/WPILibNewCommands.json @@ -1,7 +1,7 @@ { "fileName": "WPILibNewCommands.json", "name": "WPILib-New-Commands", - "version": "2023.+", + "version": "2024.+", "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", "mavenUrls": [], "jsonUrl": "", @@ -17,7 +17,7 @@ { "groupId": "edu.wpi.first.wpilibNewCommands", "artifactId": "wpilibNewCommands-cpp", - "version": "2023.+", + "version": "2024.+", "libName": "wpilibNewCommands", "headerClassifier": "headers", "sourcesClassifier": "sources", @@ -34,4 +34,4 @@ ] } ] - } \ No newline at end of file + }