Skip to content

Commit 0cdd9a7

Browse files
authored
Bump wpilib to 2025.0.0-alpha-1 and break non-FRC JDKs (#1356)
Windows users will have to add `"-Dorg.gradle.java.home=C:\Users\Public\wpilib\2024\jdk"` to gradle invocations, ie `./gradlew run "-Dorg.gradle.java.home=C:\Users\Public\wpilib\2024\jdk"`, due to MSVC ABI breakages and other stupidity
1 parent 8c45fef commit 0cdd9a7

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import edu.wpi.first.toolchain.*
22

33
plugins {
44
id "com.diffplug.spotless" version "6.24.0"
5-
id "edu.wpi.first.NativeUtils" version "2024.6.1" apply false
5+
id "edu.wpi.first.NativeUtils" version "2024.7.2" apply false
66
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2"
77
id "edu.wpi.first.GradleRIO" version "2024.3.2"
88
id 'edu.wpi.first.WpilibTools' version '1.3.0'
@@ -28,7 +28,7 @@ ext.allOutputsFolder = file("$project.buildDir/outputs")
2828
apply from: "versioningHelper.gradle"
2929

3030
ext {
31-
wpilibVersion = "2024.3.2-139-gfbfef85"
31+
wpilibVersion = "2025.0.0-alpha-1"
3232
wpimathVersion = wpilibVersion
3333
openCVversion = "4.8.0-2"
3434
joglVersion = "2.4.0"

photon-core/src/main/java/org/photonvision/common/util/TestUtils.java

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@
2222
import edu.wpi.first.cscore.CameraServerJNI;
2323
import edu.wpi.first.cscore.OpenCvLoader;
2424
import edu.wpi.first.hal.JNIWrapper;
25-
import edu.wpi.first.math.WPIMathJNI;
2625
import edu.wpi.first.math.geometry.Translation2d;
26+
import edu.wpi.first.math.jni.ArmFeedforwardJNI;
27+
import edu.wpi.first.math.jni.DAREJNI;
28+
import edu.wpi.first.math.jni.EigenJNI;
29+
import edu.wpi.first.math.jni.Ellipse2dJNI;
30+
import edu.wpi.first.math.jni.Pose3dJNI;
31+
import edu.wpi.first.math.jni.StateSpaceUtilJNI;
32+
import edu.wpi.first.math.jni.TrajectoryUtilJNI;
2733
import edu.wpi.first.math.util.Units;
2834
import edu.wpi.first.net.WPINetJNI;
2935
import edu.wpi.first.networktables.NetworkTablesJNI;
@@ -44,15 +50,29 @@ public class TestUtils {
4450
public static boolean loadLibraries() {
4551
if (has_loaded) return true;
4652

53+
// None of these work either, wbhich is odd to me. commented out for now
54+
// System.load("C:\\Users\\matth\\.wpilib\\nativecache\\windows\\x86-64\\4ca969397a399d7bcd38c546fd9ac2e1\\wpiutil.dll");
55+
// System.load("C:\\Users\\matth\\.wpilib\\nativecache\\windows\\x86-64\\4ca969397a399d7bcd38c546fd9ac2e1\\wpiutiljni.dll");
56+
// System.err.println("Test-load yay");
57+
4758
NetworkTablesJNI.Helper.setExtractOnStaticLoad(false);
4859
WPIUtilJNI.Helper.setExtractOnStaticLoad(false);
49-
WPIMathJNI.Helper.setExtractOnStaticLoad(false);
5060
CameraServerJNI.Helper.setExtractOnStaticLoad(false);
5161
OpenCvLoader.Helper.setExtractOnStaticLoad(false);
5262
JNIWrapper.Helper.setExtractOnStaticLoad(false);
5363
WPINetJNI.Helper.setExtractOnStaticLoad(false);
5464
AprilTagJNI.Helper.setExtractOnStaticLoad(false);
5565

66+
// wpimathjni is a bit odd, it's all in the wpimathjni shared lib, but the java side stuff has
67+
// been split.
68+
ArmFeedforwardJNI.Helper.setExtractOnStaticLoad(false);
69+
DAREJNI.Helper.setExtractOnStaticLoad(false);
70+
EigenJNI.Helper.setExtractOnStaticLoad(false);
71+
Ellipse2dJNI.Helper.setExtractOnStaticLoad(false);
72+
Pose3dJNI.Helper.setExtractOnStaticLoad(false);
73+
StateSpaceUtilJNI.Helper.setExtractOnStaticLoad(false);
74+
TrajectoryUtilJNI.Helper.setExtractOnStaticLoad(false);
75+
5676
try {
5777
CombinedRuntimeLoader.loadLibraries(
5878
TestUtils.class,

0 commit comments

Comments
 (0)