From db0667f1dcf401333761ba9882878d5eb1cc5dea Mon Sep 17 00:00:00 2001 From: Matt Morley Date: Sun, 4 Jan 2026 14:22:58 -0800 Subject: [PATCH] Use forked WPILib tool plugin (#2120) ## Description Update to use our fork of the WPILib tool plugin. WPILib has indicated that it won't be maintained past 2026, so we're forking it under our org. We also fixed a bug that results in native libraries for multiple platforms being included in a jar when only the native libraries for the platform being built should be included. ## Meta Merge checklist: - [x] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [x] The description documents the _what_ and _why_ - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2 - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added --------- Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com> Co-authored-by: samfreund --- .vscode/settings.json | 3 ++- build.gradle | 2 +- photon-core/build.gradle | 2 +- photon-lib/build.gradle | 2 +- photon-targeting/build.gradle | 2 +- settings.gradle | 11 +++++++++++ 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 376e6c941..35b8bcfb7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, - "python.testing.cwd": "photon-lib/py" + "python.testing.cwd": "photon-lib/py", + "java.configuration.updateBuildConfiguration": "automatic" } \ No newline at end of file diff --git a/build.gradle b/build.gradle index 8a3a2243b..472136e4e 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id "com.diffplug.spotless" version "6.24.0" id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2" id "edu.wpi.first.GradleRIO" version "2026.1.1-beta-1" - id 'edu.wpi.first.WpilibTools' version '1.3.0' + id 'org.photonvision.tools.WpilibTools' version '2.2.0-photon' id 'com.google.protobuf' version '0.9.3' apply false id 'edu.wpi.first.GradleJni' version '1.1.0' id "org.ysb33r.doxygen" version "2.0.0" apply false diff --git a/photon-core/build.gradle b/photon-core/build.gradle index d65769c28..6ec55deb0 100644 --- a/photon-core/build.gradle +++ b/photon-core/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'edu.wpi.first.WpilibTools' +apply plugin: 'org.photonvision.tools.WpilibTools' import java.nio.file.Path diff --git a/photon-lib/build.gradle b/photon-lib/build.gradle index a06fc532e..3645931ba 100644 --- a/photon-lib/build.gradle +++ b/photon-lib/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'edu.wpi.first.WpilibTools' +apply plugin: 'org.photonvision.tools.WpilibTools' import java.nio.file.Path diff --git a/photon-targeting/build.gradle b/photon-targeting/build.gradle index eef9fa9a0..63e9e4603 100644 --- a/photon-targeting/build.gradle +++ b/photon-targeting/build.gradle @@ -6,7 +6,7 @@ apply plugin: 'cpp' apply plugin: 'c' apply plugin: 'google-test-test-suite' apply plugin: 'edu.wpi.first.NativeUtils' -apply plugin: 'edu.wpi.first.WpilibTools' +apply plugin: 'org.photonvision.tools.WpilibTools' apply plugin: 'edu.wpi.first.GradleJni' ext.licenseFile = file("$rootDir/LICENSE") diff --git a/settings.gradle b/settings.gradle index f23ca6ecf..ba2c9b10e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,14 @@ +pluginManagement { + repositories { + mavenCentral() + gradlePluginPortal() + maven { + url = uri('https://maven.photonvision.org/releases') + } + mavenLocal() + } +} + include 'photon-targeting' include 'photon-core' include 'photon-server'