mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-27 02:01:40 +00:00
Upgrade to 2027 alpha
This commit is contained in:
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -51,11 +51,11 @@ jobs:
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: temurin
|
||||
- name: Install RoboRIO Toolchain
|
||||
run: ./gradlew installRoboRioToolchain
|
||||
- name: Install SystemCore Toolchain
|
||||
run: ./gradlew installSystemCoreToolchain
|
||||
- name: Delete duplicate toolchains
|
||||
run: |
|
||||
find ~/.gradle/cache/ -name *roborio-academic* -exec rm -rf {} +
|
||||
find ~/.gradle/cache/ -name *bookworm* -exec rm -rf {} +
|
||||
du -h . | sort -h
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
# Download prebuilt photonlib artifacts
|
||||
@@ -253,7 +253,7 @@ jobs:
|
||||
name: Publish
|
||||
env:
|
||||
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
|
||||
if: github.event_name == 'push' && github.repository_owner == 'photonvision'
|
||||
if: github.event_name == 'push' && github.repository_owner == 'photonvision' && github.ref == 'refs/heads/main'
|
||||
# Copy artifacts to build/outputs/maven
|
||||
- run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts
|
||||
- uses: actions/upload-artifact@v6
|
||||
@@ -291,7 +291,7 @@ jobs:
|
||||
run: ./gradlew photon-lib:publish photon-targeting:publish ${{ matrix.build-options }}
|
||||
env:
|
||||
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
|
||||
if: github.event_name == 'push' && github.repository_owner == 'photonvision'
|
||||
if: github.event_name == 'push' && github.repository_owner == 'photonvision' && github.ref == 'refs/heads/main'
|
||||
# Copy artifacts to build/outputs/maven
|
||||
- run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts ${{ matrix.build-options }}
|
||||
- uses: actions/upload-artifact@v6
|
||||
|
||||
@@ -45,7 +45,7 @@ Note that these are case sensitive!
|
||||
- `-Pprofile`: enables JVM profiling
|
||||
- `-PwithSanitizers`: On Linux, enables `-fsanitize=address,undefined,leak`
|
||||
|
||||
If you're cross-compiling, you'll need the WPILib toolchain installed. This must be done via Gradle: for example `./gradlew installArm64Toolchain` or `./gradlew installRoboRioToolchain`
|
||||
If you're cross-compiling, you'll need the WPILib toolchain installed. This must be done via Gradle: for example `./gradlew installArm64Toolchain` or `./gradlew installSystemCoreToolchain`
|
||||
|
||||
## Out-of-Source Dependencies
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import edu.wpi.first.toolchain.*
|
||||
plugins {
|
||||
id "cpp"
|
||||
id "com.diffplug.spotless" version "8.1.0"
|
||||
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2"
|
||||
id "edu.wpi.first.GradleRIO" version "2026.2.1"
|
||||
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2025.0"
|
||||
id "edu.wpi.first.GradleRIO2027" version "2027.0.0-alpha-1"
|
||||
id 'org.photonvision.tools.WpilibTools' version '2.4.1-photon'
|
||||
id 'com.google.protobuf' version '0.9.3' apply false
|
||||
id 'edu.wpi.first.GradleJni' version '1.1.0'
|
||||
@@ -21,6 +21,7 @@ allprojects {
|
||||
maven { url = "https://maven.photonvision.org/releases" }
|
||||
maven { url = "https://maven.photonvision.org/snapshots" }
|
||||
}
|
||||
wpilibRepositories.use2027Repos()
|
||||
wpilibRepositories.addAllReleaseRepositories(it)
|
||||
wpilibRepositories.addAllDevelopmentRepositories(it)
|
||||
}
|
||||
@@ -32,7 +33,7 @@ ext.allOutputsFolder = file("$project.buildDir/outputs")
|
||||
apply from: "versioningHelper.gradle"
|
||||
|
||||
ext {
|
||||
wpilibVersion = "2026.2.1"
|
||||
wpilibVersion = "2027.0.0-alpha-1"
|
||||
wpimathVersion = wpilibVersion
|
||||
openCVYear = "2025"
|
||||
openCVversion = "4.10.0-3"
|
||||
@@ -40,7 +41,7 @@ ext {
|
||||
libcameraDriverVersion = "v2026.0.0"
|
||||
rknnVersion = "dev-v2026.0.1-1-g89b2888"
|
||||
rubikVersion = "dev-v2026.0.1-4-g13d6279"
|
||||
frcYear = "2026"
|
||||
frcYear = "2027_alpha1"
|
||||
mrcalVersion = "dev-v2026.0.0-1-g239d80e";
|
||||
|
||||
pubVersion = versionString
|
||||
|
||||
@@ -23,6 +23,7 @@ dependencies {
|
||||
wpilibNatives wpilibTools.deps.wpilib("wpimath")
|
||||
wpilibNatives wpilibTools.deps.wpilib("wpinet")
|
||||
wpilibNatives wpilibTools.deps.wpilib("wpiutil")
|
||||
wpilibNatives wpilibTools.deps.wpilib("datalog")
|
||||
wpilibNatives wpilibTools.deps.wpilib("ntcore")
|
||||
wpilibNatives wpilibTools.deps.wpilib("cscore")
|
||||
wpilibNatives wpilibTools.deps.wpilib("apriltag")
|
||||
|
||||
@@ -358,7 +358,7 @@ public class NetworkTablesManager {
|
||||
ntInstance.stopClient();
|
||||
String hostname = config.shouldManage ? config.hostname : CameraServerJNI.getHostname();
|
||||
logger.debug("Starting NT Client with hostname: " + hostname);
|
||||
ntInstance.startClient4(hostname);
|
||||
ntInstance.startClient(hostname);
|
||||
try {
|
||||
int t = Integer.parseInt(config.ntServerAddress);
|
||||
if (!m_isRetryingConnection) logger.info("Starting NT Client, server team is " + t);
|
||||
|
||||
@@ -90,6 +90,7 @@ model {
|
||||
}
|
||||
}
|
||||
|
||||
nativeUtils.useRequiredLibrary(it, "datalog_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "cscore_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "cameraserver_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "wpilib_executable_shared")
|
||||
@@ -369,6 +370,7 @@ dependencies {
|
||||
nativeConfig.dependencies.add wpilibTools.deps.wpilib("wpimath")
|
||||
nativeConfig.dependencies.add wpilibTools.deps.wpilib("wpinet")
|
||||
nativeConfig.dependencies.add wpilibTools.deps.wpilib("wpiutil")
|
||||
nativeConfig.dependencies.add wpilibTools.deps.wpilib("datalog")
|
||||
nativeConfig.dependencies.add wpilibTools.deps.wpilib("ntcore")
|
||||
nativeConfig.dependencies.add wpilibTools.deps.wpilib("cscore")
|
||||
nativeConfig.dependencies.add wpilibTools.deps.wpilib("apriltag")
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
package org.photonvision;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.math.MatBuilder;
|
||||
import edu.wpi.first.math.Matrix;
|
||||
@@ -176,8 +175,8 @@ public class PhotonCamera implements AutoCloseable {
|
||||
new MultiSubscriber(
|
||||
instance, new String[] {"/photonvision/"}, PubSubOption.topicsOnly(true));
|
||||
|
||||
HAL.report(tResourceType.kResourceType_PhotonCamera, InstanceCount);
|
||||
InstanceCount++;
|
||||
HAL.reportUsage("PhotonVision/PhotonCamera", InstanceCount, "");
|
||||
|
||||
// HACK - start a TimeSyncServer, if we haven't yet.
|
||||
TimeSyncSingleton.load();
|
||||
|
||||
@@ -26,7 +26,6 @@ package org.photonvision;
|
||||
|
||||
import edu.wpi.first.apriltag.AprilTagFieldLayout;
|
||||
import edu.wpi.first.cscore.OpenCvLoader;
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.math.Matrix;
|
||||
import edu.wpi.first.math.Pair;
|
||||
@@ -184,8 +183,8 @@ public class PhotonPoseEstimator {
|
||||
OpenCvLoader.forceStaticLoad();
|
||||
}
|
||||
|
||||
HAL.report(tResourceType.kResourceType_PhotonPoseEstimator, InstanceCount);
|
||||
InstanceCount++;
|
||||
HAL.reportUsage("PhotonVision/PhotonPoseEstimator", InstanceCount, "");
|
||||
}
|
||||
|
||||
/** Invalidates the pose cache. */
|
||||
|
||||
@@ -166,8 +166,8 @@ PhotonCamera::PhotonCamera(nt::NetworkTableInstance instance,
|
||||
frc::Alert::AlertType::kWarning),
|
||||
timesyncAlert(PHOTON_ALERT_GROUP, "", frc::Alert::AlertType::kWarning) {
|
||||
verifyDependencies();
|
||||
HAL_Report(HALUsageReporting::kResourceType_PhotonCamera, InstanceCount);
|
||||
InstanceCount++;
|
||||
HAL_ReportUsage("PhotonVision/PhotonCamera", InstanceCount, "");
|
||||
|
||||
// The Robot class is actually created here:
|
||||
// https://github.com/wpilibsuite/allwpilib/blob/811b1309683e930a1ce69fae818f943ff161b7a5/wpilibc/src/main/native/include/frc/RobotBase.h#L33
|
||||
|
||||
@@ -86,9 +86,8 @@ PhotonPoseEstimator::PhotonPoseEstimator(frc::AprilTagFieldLayout tags,
|
||||
referencePose(frc::Pose3d()),
|
||||
poseCacheTimestamp(-1_s),
|
||||
headingBuffer(frc::TimeInterpolatableBuffer<frc::Rotation2d>(1_s)) {
|
||||
HAL_Report(HALUsageReporting::kResourceType_PhotonPoseEstimator,
|
||||
InstanceCount);
|
||||
InstanceCount++;
|
||||
HAL_ReportUsage("PhotonVision/PhotonPoseEstimator", InstanceCount, "");
|
||||
}
|
||||
|
||||
void PhotonPoseEstimator::SetMultiTagFallbackStrategy(PoseStrategy strategy) {
|
||||
|
||||
@@ -253,14 +253,14 @@ class PhotonCameraTest {
|
||||
|
||||
if (i == coprocStart || i == coprocRestart) {
|
||||
coprocNt.setServer("127.0.0.1", 5940);
|
||||
coprocNt.startClient4("testClient");
|
||||
coprocNt.startClient("testClient");
|
||||
|
||||
// PhotonCamera makes a server by default - connect to it
|
||||
tspClient = new TimeSyncClient("127.0.0.1", 5810, 0.5);
|
||||
}
|
||||
|
||||
if (i == robotStart || i == robotRestart) {
|
||||
robotNt.startServer("networktables_random.json", "", 5941, 5940);
|
||||
robotNt.startServer("networktables_random.json", "", 5940);
|
||||
}
|
||||
|
||||
Thread.sleep(100);
|
||||
|
||||
@@ -55,6 +55,7 @@ model {
|
||||
}
|
||||
|
||||
nativeUtils.useRequiredLibrary(it, "wpiutil_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "datalog_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "wpimath_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "wpinet_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "ntcore_shared")
|
||||
@@ -83,6 +84,7 @@ model {
|
||||
}
|
||||
|
||||
nativeUtils.useRequiredLibrary(it, "wpiutil_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "datalog_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "wpimath_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "wpinet_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "ntcore_shared")
|
||||
@@ -120,6 +122,7 @@ model {
|
||||
|
||||
nativeUtils.useRequiredLibrary(it, "wpilib_executable_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "googletest_static")
|
||||
nativeUtils.useRequiredLibrary(it, "datalog_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "apriltag_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "cscore_shared")
|
||||
nativeUtils.useRequiredLibrary(it, "opencv_shared")
|
||||
@@ -179,6 +182,7 @@ def nativeTasks = wpilibTools.createExtractionTasks {
|
||||
nativeTasks.addToSourceSetResources(sourceSets.test)
|
||||
|
||||
nativeConfig.dependencies.add wpilibTools.deps.wpilib("wpiutil")
|
||||
nativeConfig.dependencies.add wpilibTools.deps.wpilib("datalog")
|
||||
nativeConfig.dependencies.add wpilibTools.deps.wpilib("wpimath")
|
||||
nativeConfig.dependencies.add wpilibTools.deps.wpilib("wpinet")
|
||||
nativeConfig.dependencies.add wpilibTools.deps.wpilib("ntcore")
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/FileLogger.h>
|
||||
#include <wpi/datalog/FileLogger.h>
|
||||
|
||||
#include "jni_utils.h"
|
||||
#include "org_photonvision_jni_QueuedFileLogger.h"
|
||||
@@ -30,7 +30,7 @@ struct QueuedFileLogger {
|
||||
|
||||
std::mutex m_mutex;
|
||||
|
||||
wpi::FileLogger logger;
|
||||
wpi::log::FileLogger logger;
|
||||
|
||||
explicit QueuedFileLogger(std::string_view file)
|
||||
: logger{file, std::bind(&QueuedFileLogger::callback, this,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id "cpp"
|
||||
id "google-test-test-suite"
|
||||
id "edu.wpi.first.GradleRIO" version "2026.2.1"
|
||||
id "edu.wpi.first.GradleRIO2027" version "2027.0.0-alpha-1"
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -11,14 +11,13 @@ repositories {
|
||||
|
||||
wpi.maven.useLocal = false
|
||||
wpi.maven.useDevelopment = false
|
||||
wpi.versions.wpilibVersion = "2026.2.1"
|
||||
wpi.versions.wpimathVersion = "2026.2.1"
|
||||
wpi.versions.wpilibVersion = "2027.0.+"
|
||||
|
||||
// Define my targets (RoboRIO) and artifacts (deployable files)
|
||||
// Define my targets (SystemCore) and artifacts (deployable files)
|
||||
// This is added by GradleRIO's backing project DeployUtils.
|
||||
deploy {
|
||||
targets {
|
||||
roborio(getTargetTypeClass('RoboRIO')) {
|
||||
systemcore(getTargetTypeClass('SystemCore')) {
|
||||
// Team number is loaded either from the .wpilib/wpilib_preferences.json
|
||||
// or from command line. If not found an exception will be thrown.
|
||||
// You can use getTeamOrDefault(team) instead of getTeamNumber if you
|
||||
@@ -36,8 +35,8 @@ deploy {
|
||||
// Static files artifact
|
||||
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
|
||||
files = project.fileTree('src/main/deploy')
|
||||
directory = '/home/lvuser/deploy'
|
||||
deleteOldFiles = false // Change to true to delete files on roboRIO that no
|
||||
directory = '/home/systemcore/deploy'
|
||||
deleteOldFiles = false // Change to true to delete files on SystemCore that no
|
||||
// longer exist in deploy directory of this project
|
||||
}
|
||||
}
|
||||
@@ -45,7 +44,7 @@ deploy {
|
||||
}
|
||||
}
|
||||
|
||||
def deployArtifact = deploy.targets.roborio.artifacts.frcCpp
|
||||
def deployArtifact = deploy.targets.systemcore.artifacts.frcCpp
|
||||
|
||||
// Set this to true to enable desktop support.
|
||||
def includeDesktopSupport = true
|
||||
@@ -61,15 +60,7 @@ wpi.sim.addDriverstation()
|
||||
model {
|
||||
components {
|
||||
frcUserProgram(NativeExecutableSpec) {
|
||||
// We don't need to build for roborio -- if we do, we need to install
|
||||
// a roborio toolchain every time we build in CI
|
||||
// Ideally, we'd be able to set the roborio toolchain as optional, but
|
||||
// I can't figure out how to set that environment variable from build.gradle
|
||||
// (see https://github.com/wpilibsuite/native-utils/blob/2917c69fb5094e36d499c465f047dab81c68446c/ToolchainPlugin/src/main/java/edu/wpi/first/toolchain/ToolchainGraphBuildService.java#L71)
|
||||
// for now, commented out
|
||||
|
||||
// targetPlatform wpi.platforms.roborio
|
||||
|
||||
targetPlatform wpi.platforms.systemcore
|
||||
if (includeDesktopSupport) {
|
||||
targetPlatform wpi.platforms.desktop
|
||||
}
|
||||
|
||||
@@ -3,9 +3,8 @@ import org.gradle.internal.os.OperatingSystem
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
gradlePluginPortal()
|
||||
String frcYear = '2026'
|
||||
String frcYear = '2027_alpha1'
|
||||
File frcHome
|
||||
if (OperatingSystem.current().isWindows()) {
|
||||
String publicFolder = System.getenv('PUBLIC')
|
||||
@@ -21,8 +20,11 @@ pluginManagement {
|
||||
}
|
||||
def frcHomeMaven = new File(frcHome, 'maven')
|
||||
maven {
|
||||
name 'frcHome'
|
||||
url frcHomeMaven
|
||||
name = 'frcHome'
|
||||
url = frcHomeMaven
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Properties props = System.getProperties();
|
||||
props.setProperty("org.gradle.internal.native.headers.unresolved.dependencies.ignore", "true");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id "cpp"
|
||||
id "google-test-test-suite"
|
||||
id "edu.wpi.first.GradleRIO" version "2026.2.1"
|
||||
id "edu.wpi.first.GradleRIO2027" version "2027.0.0-alpha-1"
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -11,14 +11,13 @@ repositories {
|
||||
|
||||
wpi.maven.useLocal = false
|
||||
wpi.maven.useDevelopment = false
|
||||
wpi.versions.wpilibVersion = "2026.2.1"
|
||||
wpi.versions.wpimathVersion = "2026.2.1"
|
||||
wpi.versions.wpilibVersion = "2027.0.+"
|
||||
|
||||
// Define my targets (RoboRIO) and artifacts (deployable files)
|
||||
// Define my targets (SystemCore) and artifacts (deployable files)
|
||||
// This is added by GradleRIO's backing project DeployUtils.
|
||||
deploy {
|
||||
targets {
|
||||
roborio(getTargetTypeClass('RoboRIO')) {
|
||||
systemcore(getTargetTypeClass('SystemCore')) {
|
||||
// Team number is loaded either from the .wpilib/wpilib_preferences.json
|
||||
// or from command line. If not found an exception will be thrown.
|
||||
// You can use getTeamOrDefault(team) instead of getTeamNumber if you
|
||||
@@ -36,8 +35,8 @@ deploy {
|
||||
// Static files artifact
|
||||
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
|
||||
files = project.fileTree('src/main/deploy')
|
||||
directory = '/home/lvuser/deploy'
|
||||
deleteOldFiles = false // Change to true to delete files on roboRIO that no
|
||||
directory = '/home/systemcore/deploy'
|
||||
deleteOldFiles = false // Change to true to delete files on SystemCore that no
|
||||
// longer exist in deploy directory of this project
|
||||
}
|
||||
}
|
||||
@@ -45,7 +44,7 @@ deploy {
|
||||
}
|
||||
}
|
||||
|
||||
def deployArtifact = deploy.targets.roborio.artifacts.frcCpp
|
||||
def deployArtifact = deploy.targets.systemcore.artifacts.frcCpp
|
||||
|
||||
// Set this to true to enable desktop support.
|
||||
def includeDesktopSupport = true
|
||||
@@ -61,15 +60,7 @@ wpi.sim.addDriverstation()
|
||||
model {
|
||||
components {
|
||||
frcUserProgram(NativeExecutableSpec) {
|
||||
// We don't need to build for roborio -- if we do, we need to install
|
||||
// a roborio toolchain every time we build in CI
|
||||
// Ideally, we'd be able to set the roborio toolchain as optional, but
|
||||
// I can't figure out how to set that environment variable from build.gradle
|
||||
// (see https://github.com/wpilibsuite/native-utils/blob/2917c69fb5094e36d499c465f047dab81c68446c/ToolchainPlugin/src/main/java/edu/wpi/first/toolchain/ToolchainGraphBuildService.java#L71)
|
||||
// for now, commented out
|
||||
|
||||
// targetPlatform wpi.platforms.roborio
|
||||
|
||||
targetPlatform wpi.platforms.systemcore
|
||||
if (includeDesktopSupport) {
|
||||
targetPlatform wpi.platforms.desktop
|
||||
}
|
||||
|
||||
@@ -3,9 +3,8 @@ import org.gradle.internal.os.OperatingSystem
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
gradlePluginPortal()
|
||||
String frcYear = '2026'
|
||||
String frcYear = '2027_alpha1'
|
||||
File frcHome
|
||||
if (OperatingSystem.current().isWindows()) {
|
||||
String publicFolder = System.getenv('PUBLIC')
|
||||
@@ -21,8 +20,11 @@ pluginManagement {
|
||||
}
|
||||
def frcHomeMaven = new File(frcHome, 'maven')
|
||||
maven {
|
||||
name 'frcHome'
|
||||
url frcHomeMaven
|
||||
name = 'frcHome'
|
||||
url = frcHomeMaven
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Properties props = System.getProperties();
|
||||
props.setProperty("org.gradle.internal.native.headers.unresolved.dependencies.ignore", "true");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id "cpp"
|
||||
id "google-test-test-suite"
|
||||
id "edu.wpi.first.GradleRIO" version "2026.2.1"
|
||||
id "edu.wpi.first.GradleRIO2027" version "2027.0.0-alpha-1"
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -11,14 +11,13 @@ repositories {
|
||||
|
||||
wpi.maven.useLocal = false
|
||||
wpi.maven.useDevelopment = false
|
||||
wpi.versions.wpilibVersion = "2026.2.1"
|
||||
wpi.versions.wpimathVersion = "2026.2.1"
|
||||
wpi.versions.wpilibVersion = "2027.0.+"
|
||||
|
||||
// Define my targets (RoboRIO) and artifacts (deployable files)
|
||||
// Define my targets (SystemCore) and artifacts (deployable files)
|
||||
// This is added by GradleRIO's backing project DeployUtils.
|
||||
deploy {
|
||||
targets {
|
||||
roborio(getTargetTypeClass('RoboRIO')) {
|
||||
systemcore(getTargetTypeClass('SystemCore')) {
|
||||
// Team number is loaded either from the .wpilib/wpilib_preferences.json
|
||||
// or from command line. If not found an exception will be thrown.
|
||||
// You can use getTeamOrDefault(team) instead of getTeamNumber if you
|
||||
@@ -36,8 +35,8 @@ deploy {
|
||||
// Static files artifact
|
||||
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
|
||||
files = project.fileTree('src/main/deploy')
|
||||
directory = '/home/lvuser/deploy'
|
||||
deleteOldFiles = false // Change to true to delete files on roboRIO that no
|
||||
directory = '/home/systemcore/deploy'
|
||||
deleteOldFiles = false // Change to true to delete files on SystemCore that no
|
||||
// longer exist in deploy directory of this project
|
||||
}
|
||||
}
|
||||
@@ -45,7 +44,7 @@ deploy {
|
||||
}
|
||||
}
|
||||
|
||||
def deployArtifact = deploy.targets.roborio.artifacts.frcCpp
|
||||
def deployArtifact = deploy.targets.systemcore.artifacts.frcCpp
|
||||
|
||||
// Set this to true to enable desktop support.
|
||||
def includeDesktopSupport = true
|
||||
@@ -61,15 +60,7 @@ wpi.sim.addDriverstation()
|
||||
model {
|
||||
components {
|
||||
frcUserProgram(NativeExecutableSpec) {
|
||||
// We don't need to build for roborio -- if we do, we need to install
|
||||
// a roborio toolchain every time we build in CI
|
||||
// Ideally, we'd be able to set the roborio toolchain as optional, but
|
||||
// I can't figure out how to set that environment variable from build.gradle
|
||||
// (see https://github.com/wpilibsuite/native-utils/blob/2917c69fb5094e36d499c465f047dab81c68446c/ToolchainPlugin/src/main/java/edu/wpi/first/toolchain/ToolchainGraphBuildService.java#L71)
|
||||
// for now, commented out
|
||||
|
||||
// targetPlatform wpi.platforms.roborio
|
||||
|
||||
targetPlatform wpi.platforms.systemcore
|
||||
if (includeDesktopSupport) {
|
||||
targetPlatform wpi.platforms.desktop
|
||||
}
|
||||
|
||||
@@ -3,9 +3,8 @@ import org.gradle.internal.os.OperatingSystem
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
gradlePluginPortal()
|
||||
String frcYear = '2026'
|
||||
String frcYear = '2027_alpha1'
|
||||
File frcHome
|
||||
if (OperatingSystem.current().isWindows()) {
|
||||
String publicFolder = System.getenv('PUBLIC')
|
||||
@@ -21,8 +20,11 @@ pluginManagement {
|
||||
}
|
||||
def frcHomeMaven = new File(frcHome, 'maven')
|
||||
maven {
|
||||
name 'frcHome'
|
||||
url frcHomeMaven
|
||||
name = 'frcHome'
|
||||
url = frcHomeMaven
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Properties props = System.getProperties();
|
||||
props.setProperty("org.gradle.internal.native.headers.unresolved.dependencies.ignore", "true");
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
plugins {
|
||||
id "java"
|
||||
id "edu.wpi.first.GradleRIO" version "2026.2.1"
|
||||
id "edu.wpi.first.GradleRIO2027" version "2027.0.0-alpha-1"
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
def ROBOT_MAIN_CLASS = "frc.robot.Main"
|
||||
|
||||
@@ -13,20 +15,18 @@ repositories {
|
||||
}
|
||||
|
||||
wpi.maven.useDevelopment = true
|
||||
wpi.versions.wpilibVersion = "2026.2.1"
|
||||
wpi.versions.wpimathVersion = "2026.2.1"
|
||||
wpi.versions.wpilibVersion = "2027.0.+"
|
||||
|
||||
|
||||
// Define my targets (RoboRIO) and artifacts (deployable files)
|
||||
// Define my targets (SystemCore) and artifacts (deployable files)
|
||||
// This is added by GradleRIO's backing project DeployUtils.
|
||||
deploy {
|
||||
targets {
|
||||
roborio(getTargetTypeClass('RoboRIO')) {
|
||||
systemcore(getTargetTypeClass('SystemCore')) {
|
||||
// Team number is loaded either from the .wpilib/wpilib_preferences.json
|
||||
// or from command line. If not found an exception will be thrown.
|
||||
// You can use getTeamOrDefault(team) instead of getTeamNumber if you
|
||||
// want to store a team number in this file.
|
||||
team = project.frc.getTeamOrDefault(4512)
|
||||
team = project.frc.getTeamOrDefault(5940)
|
||||
debug = project.frc.getDebugOrDefault(false)
|
||||
|
||||
artifacts {
|
||||
@@ -39,8 +39,8 @@ deploy {
|
||||
// Static files artifact
|
||||
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
|
||||
files = project.fileTree('src/main/deploy')
|
||||
directory = '/home/lvuser/deploy'
|
||||
deleteOldFiles = false // Change to true to delete files on roboRIO that no
|
||||
directory = '/home/systemcore/deploy'
|
||||
deleteOldFiles = false // Change to true to delete files on systemcore that no
|
||||
// longer exist in deploy directory of this project
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ deploy {
|
||||
}
|
||||
}
|
||||
|
||||
def deployArtifact = deploy.targets.roborio.artifacts.frcJava
|
||||
def deployArtifact = deploy.targets.systemcore.artifacts.frcJava
|
||||
|
||||
// Set to true to use debug for all targets including JNI, which will drastically impact
|
||||
// performance.
|
||||
@@ -64,11 +64,11 @@ dependencies {
|
||||
implementation wpi.java.deps.wpilib()
|
||||
implementation wpi.java.vendor.java()
|
||||
|
||||
roborioDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.roborio)
|
||||
roborioDebug wpi.java.vendor.jniDebug(wpi.platforms.roborio)
|
||||
systemcoreDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.systemcore)
|
||||
systemcoreDebug wpi.java.vendor.jniDebug(wpi.platforms.systemcore)
|
||||
|
||||
roborioRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.roborio)
|
||||
roborioRelease wpi.java.vendor.jniRelease(wpi.platforms.roborio)
|
||||
systemcoreRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.systemcore)
|
||||
systemcoreRelease wpi.java.vendor.jniRelease(wpi.platforms.systemcore)
|
||||
|
||||
nativeDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.desktop)
|
||||
nativeDebug wpi.java.vendor.jniDebug(wpi.platforms.desktop)
|
||||
|
||||
@@ -4,7 +4,7 @@ pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
gradlePluginPortal()
|
||||
String frcYear = '2026'
|
||||
String frcYear = '2027_alpha1'
|
||||
File frcHome
|
||||
if (OperatingSystem.current().isWindows()) {
|
||||
String publicFolder = System.getenv('PUBLIC')
|
||||
@@ -20,8 +20,11 @@ pluginManagement {
|
||||
}
|
||||
def frcHomeMaven = new File(frcHome, 'maven')
|
||||
maven {
|
||||
name 'frcHome'
|
||||
url frcHomeMaven
|
||||
name = 'frcHome'
|
||||
url = frcHomeMaven
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Properties props = System.getProperties();
|
||||
props.setProperty("org.gradle.internal.native.headers.unresolved.dependencies.ignore", "true");
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
plugins {
|
||||
id "java"
|
||||
id "edu.wpi.first.GradleRIO" version "2026.2.1"
|
||||
id "edu.wpi.first.GradleRIO2027" version "2027.0.0-alpha-1"
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
def ROBOT_MAIN_CLASS = "frc.robot.Main"
|
||||
|
||||
wpi.maven.useDevelopment = true
|
||||
wpi.versions.wpilibVersion = "2026.2.1"
|
||||
wpi.versions.wpimathVersion = "2026.2.1"
|
||||
wpi.versions.wpilibVersion = "2027.0.+"
|
||||
|
||||
|
||||
// Define my targets (RoboRIO) and artifacts (deployable files)
|
||||
// Define my targets (SystemCore) and artifacts (deployable files)
|
||||
// This is added by GradleRIO's backing project DeployUtils.
|
||||
deploy {
|
||||
targets {
|
||||
roborio(getTargetTypeClass('RoboRIO')) {
|
||||
systemcore(getTargetTypeClass('SystemCore')) {
|
||||
// Team number is loaded either from the .wpilib/wpilib_preferences.json
|
||||
// or from command line. If not found an exception will be thrown.
|
||||
// You can use getTeamOrDefault(team) instead of getTeamNumber if you
|
||||
// want to store a team number in this file.
|
||||
team = project.frc.getTeamOrDefault(1736)
|
||||
team = project.frc.getTeamOrDefault(5940)
|
||||
debug = project.frc.getDebugOrDefault(false)
|
||||
|
||||
artifacts {
|
||||
@@ -35,8 +35,8 @@ deploy {
|
||||
// Static files artifact
|
||||
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
|
||||
files = project.fileTree('src/main/deploy')
|
||||
directory = '/home/lvuser/deploy'
|
||||
deleteOldFiles = false // Change to true to delete files on roboRIO that no
|
||||
directory = '/home/systemcore/deploy'
|
||||
deleteOldFiles = false // Change to true to delete files on systemcore that no
|
||||
// longer exist in deploy directory of this project
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ deploy {
|
||||
}
|
||||
}
|
||||
|
||||
def deployArtifact = deploy.targets.roborio.artifacts.frcJava
|
||||
def deployArtifact = deploy.targets.systemcore.artifacts.frcJava
|
||||
|
||||
// Set to true to use debug for all targets including JNI, which will drastically impact
|
||||
// performance.
|
||||
@@ -60,11 +60,11 @@ dependencies {
|
||||
implementation wpi.java.deps.wpilib()
|
||||
implementation wpi.java.vendor.java()
|
||||
|
||||
roborioDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.roborio)
|
||||
roborioDebug wpi.java.vendor.jniDebug(wpi.platforms.roborio)
|
||||
systemcoreDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.systemcore)
|
||||
systemcoreDebug wpi.java.vendor.jniDebug(wpi.platforms.systemcore)
|
||||
|
||||
roborioRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.roborio)
|
||||
roborioRelease wpi.java.vendor.jniRelease(wpi.platforms.roborio)
|
||||
systemcoreRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.systemcore)
|
||||
systemcoreRelease wpi.java.vendor.jniRelease(wpi.platforms.systemcore)
|
||||
|
||||
nativeDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.desktop)
|
||||
nativeDebug wpi.java.vendor.jniDebug(wpi.platforms.desktop)
|
||||
|
||||
@@ -4,7 +4,7 @@ pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
gradlePluginPortal()
|
||||
String frcYear = '2026'
|
||||
String frcYear = '2027_alpha1'
|
||||
File frcHome
|
||||
if (OperatingSystem.current().isWindows()) {
|
||||
String publicFolder = System.getenv('PUBLIC')
|
||||
@@ -20,8 +20,11 @@ pluginManagement {
|
||||
}
|
||||
def frcHomeMaven = new File(frcHome, 'maven')
|
||||
maven {
|
||||
name 'frcHome'
|
||||
url frcHomeMaven
|
||||
name = 'frcHome'
|
||||
url = frcHomeMaven
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Properties props = System.getProperties();
|
||||
props.setProperty("org.gradle.internal.native.headers.unresolved.dependencies.ignore", "true");
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
plugins {
|
||||
id "java"
|
||||
id "edu.wpi.first.GradleRIO" version "2026.2.1"
|
||||
id "edu.wpi.first.GradleRIO2027" version "2027.0.0-alpha-1"
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
def ROBOT_MAIN_CLASS = "frc.robot.Main"
|
||||
|
||||
wpi.maven.useDevelopment = true
|
||||
wpi.versions.wpilibVersion = "2026.2.1"
|
||||
wpi.versions.wpimathVersion = "2026.2.1"
|
||||
wpi.versions.wpilibVersion = "2027.0.+"
|
||||
|
||||
|
||||
// Define my targets (RoboRIO) and artifacts (deployable files)
|
||||
// Define my targets (SystemCore) and artifacts (deployable files)
|
||||
// This is added by GradleRIO's backing project DeployUtils.
|
||||
deploy {
|
||||
targets {
|
||||
roborio(getTargetTypeClass('RoboRIO')) {
|
||||
systemcore(getTargetTypeClass('SystemCore')) {
|
||||
// Team number is loaded either from the .wpilib/wpilib_preferences.json
|
||||
// or from command line. If not found an exception will be thrown.
|
||||
// You can use getTeamOrDefault(team) instead of getTeamNumber if you
|
||||
// want to store a team number in this file.
|
||||
team = project.frc.getTeamOrDefault(4512)
|
||||
team = project.frc.getTeamOrDefault(5940)
|
||||
debug = project.frc.getDebugOrDefault(false)
|
||||
|
||||
artifacts {
|
||||
@@ -35,8 +35,8 @@ deploy {
|
||||
// Static files artifact
|
||||
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
|
||||
files = project.fileTree('src/main/deploy')
|
||||
directory = '/home/lvuser/deploy'
|
||||
deleteOldFiles = false // Change to true to delete files on roboRIO that no
|
||||
directory = '/home/systemcore/deploy'
|
||||
deleteOldFiles = false // Change to true to delete files on systemcore that no
|
||||
// longer exist in deploy directory of this project
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ deploy {
|
||||
}
|
||||
}
|
||||
|
||||
def deployArtifact = deploy.targets.roborio.artifacts.frcJava
|
||||
def deployArtifact = deploy.targets.systemcore.artifacts.frcJava
|
||||
|
||||
// Set to true to use debug for all targets including JNI, which will drastically impact
|
||||
// performance.
|
||||
@@ -60,11 +60,11 @@ dependencies {
|
||||
implementation wpi.java.deps.wpilib()
|
||||
implementation wpi.java.vendor.java()
|
||||
|
||||
roborioDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.roborio)
|
||||
roborioDebug wpi.java.vendor.jniDebug(wpi.platforms.roborio)
|
||||
systemcoreDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.systemcore)
|
||||
systemcoreDebug wpi.java.vendor.jniDebug(wpi.platforms.systemcore)
|
||||
|
||||
roborioRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.roborio)
|
||||
roborioRelease wpi.java.vendor.jniRelease(wpi.platforms.roborio)
|
||||
systemcoreRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.systemcore)
|
||||
systemcoreRelease wpi.java.vendor.jniRelease(wpi.platforms.systemcore)
|
||||
|
||||
nativeDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.desktop)
|
||||
nativeDebug wpi.java.vendor.jniDebug(wpi.platforms.desktop)
|
||||
|
||||
@@ -4,7 +4,7 @@ pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
gradlePluginPortal()
|
||||
String frcYear = '2026'
|
||||
String frcYear = '2027_alpha1'
|
||||
File frcHome
|
||||
if (OperatingSystem.current().isWindows()) {
|
||||
String publicFolder = System.getenv('PUBLIC')
|
||||
@@ -20,8 +20,11 @@ pluginManagement {
|
||||
}
|
||||
def frcHomeMaven = new File(frcHome, 'maven')
|
||||
maven {
|
||||
name 'frcHome'
|
||||
url frcHomeMaven
|
||||
name = 'frcHome'
|
||||
url = frcHomeMaven
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Properties props = System.getProperties();
|
||||
props.setProperty("org.gradle.internal.native.headers.unresolved.dependencies.ignore", "true");
|
||||
|
||||
@@ -24,6 +24,7 @@ dependencies {
|
||||
implementation 'org.msgpack:jackson-dataformat-msgpack:0.9.0'
|
||||
|
||||
implementation wpilibTools.deps.wpilibJava("wpiutil")
|
||||
implementation wpilibTools.deps.wpilibJava("datalog")
|
||||
implementation wpilibTools.deps.wpilibJava("cameraserver")
|
||||
implementation wpilibTools.deps.wpilibJava("cscore")
|
||||
implementation wpilibTools.deps.wpilibJava("wpinet")
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Configure Native-Utils WPI Plugin
|
||||
nativeUtils.addWpiNativeUtils()
|
||||
nativeUtils.withCrossRoboRIO()
|
||||
nativeUtils.withCrossLinuxArm32()
|
||||
nativeUtils.withCrossLinuxArm64()
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ dependencies {
|
||||
}
|
||||
|
||||
implementation wpilibTools.deps.wpilibJava("wpiutil")
|
||||
implementation wpilibTools.deps.wpilibJava("datalog")
|
||||
implementation wpilibTools.deps.wpilibJava("cameraserver")
|
||||
implementation wpilibTools.deps.wpilibJava("cscore")
|
||||
implementation wpilibTools.deps.wpilibJava("wpinet")
|
||||
|
||||
Reference in New Issue
Block a user