From 2d12892a9d042e8aae91ae6807d8beb608259d78 Mon Sep 17 00:00:00 2001 From: Kevin Cooney Date: Wed, 24 Sep 2025 19:38:15 -0700 Subject: [PATCH 1/3] Configure all maven repos in one place This reduces duplication, and allows us to not have to add vendordeps for indirect dependencies. --- build.gradle | 21 +++++++++++++++++ lib/build.gradle | 9 ------- lib/vendordeps/PathplannerLib.json | 38 ------------------------------ limelight/build.gradle | 4 ---- testing/build.gradle | 9 ------- 5 files changed, 21 insertions(+), 60 deletions(-) create mode 100644 build.gradle delete mode 100644 lib/vendordeps/PathplannerLib.json diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..91f33473 --- /dev/null +++ b/build.gradle @@ -0,0 +1,21 @@ +allprojects { + repositories { + mavenCentral() + maven { + // WPI + url 'https://frcmaven.wpi.edu/artifactory/release/' + } + maven { + // CTRE + url 'https://maven.ctr-electronics.com/release' + } + maven { + // REV Robotics + url 'https://maven.revrobotics.com/' + } + maven { + // PathPlanner + url 'https://3015rangerrobotics.github.io/pathplannerlib/repo' + } + } +} \ No newline at end of file diff --git a/lib/build.gradle b/lib/build.gradle index 1d6c8e32..3f2aa47f 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -6,15 +6,6 @@ plugins { version = '2.0.0-alpha.1' -repositories { - // Use Maven Central for resolving dependencies. - mavenCentral() - maven { - // WPI - url 'https://frcmaven.wpi.edu/artifactory/release/' - } -} - dependencies { implementation wpi.java.deps.wpilib() implementation wpi.java.vendor.java() diff --git a/lib/vendordeps/PathplannerLib.json b/lib/vendordeps/PathplannerLib.json deleted file mode 100644 index 7dbcb1f2..00000000 --- a/lib/vendordeps/PathplannerLib.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "fileName": "PathplannerLib.json", - "name": "PathplannerLib", - "version": "2025.2.1", - "uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", - "frcYear": "2025", - "mavenUrls": [ - "https://3015rangerrobotics.github.io/pathplannerlib/repo" - ], - "jsonUrl": "https://3015rangerrobotics.github.io/pathplannerlib/PathplannerLib.json", - "javaDependencies": [ - { - "groupId": "com.pathplanner.lib", - "artifactId": "PathplannerLib-java", - "version": "2025.2.1" - } - ], - "jniDependencies": [], - "cppDependencies": [ - { - "groupId": "com.pathplanner.lib", - "artifactId": "PathplannerLib-cpp", - "version": "2025.2.1", - "libName": "PathplannerLib", - "headerClassifier": "headers", - "sharedLibrary": false, - "skipInvalidPlatforms": true, - "binaryPlatforms": [ - "windowsx86-64", - "linuxx86-64", - "osxuniversal", - "linuxathena", - "linuxarm32", - "linuxarm64" - ] - } - ] -} \ No newline at end of file diff --git a/limelight/build.gradle b/limelight/build.gradle index 3b88862e..3354e674 100644 --- a/limelight/build.gradle +++ b/limelight/build.gradle @@ -11,10 +11,6 @@ idea { } } -repositories { - mavenCentral() -} - dependencies { implementation wpi.java.deps.wpilib() implementation wpi.java.vendor.java() diff --git a/testing/build.gradle b/testing/build.gradle index 2656b7db..35a57d43 100644 --- a/testing/build.gradle +++ b/testing/build.gradle @@ -5,15 +5,6 @@ plugins { version = '1.0.0-alpha.1' -repositories { - // Use Maven Central for resolving dependencies. - mavenCentral() - maven { - // WPI - url 'https://frcmaven.wpi.edu/artifactory/release/' - } -} - dependencies { implementation wpi.java.deps.wpilib() implementation wpi.java.vendor.java() From 8d1b8b5138b2e9d02ac961adcffd5d84f0b17c3e Mon Sep 17 00:00:00 2001 From: Kevin Cooney Date: Wed, 24 Sep 2025 19:28:41 -0700 Subject: [PATCH 2/3] Move FakePIDMotor from :lib to :testing This reduces the number of dependencies pulled in by :lib, which reduces how much code has to be deployed to the robot. --- lib/build.gradle | 4 ++-- .../lib2813/subsystems/ParameterizedIntakeSubsystemTest.java | 2 +- testing/build.gradle | 1 + .../main/java/com/team2813/lib2813/testing}/FakePIDMotor.java | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) rename {lib/src/main/java/com/team2813/lib2813/util => testing/src/main/java/com/team2813/lib2813/testing}/FakePIDMotor.java (96%) diff --git a/lib/build.gradle b/lib/build.gradle index 3f2aa47f..b6f8b332 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -20,11 +20,11 @@ dependencies { testImplementation(platform('org.junit:junit-bom:5.13.1')) testImplementation('org.junit.jupiter:junit-jupiter') - testImplementation 'org.mockito:mockito-core:5.14.2' + testImplementation('org.mockito:mockito-core:5.14.2') + testImplementation('com.google.truth:truth:1.4.4') testRuntimeOnly('org.junit.platform:junit-platform-launcher') testRuntimeOnly('org.junit.vintage:junit-vintage-engine') testImplementation 'junit:junit:4.13.2' - implementation 'com.google.truth:truth:1.4.4'//needed for FakePIDMotor testImplementation project(':testing') compileOnly 'com.google.auto.value:auto-value-annotations:1.11.0' annotationProcessor 'com.google.auto.value:auto-value:1.11.0' diff --git a/lib/src/test/java/com/team2813/lib2813/subsystems/ParameterizedIntakeSubsystemTest.java b/lib/src/test/java/com/team2813/lib2813/subsystems/ParameterizedIntakeSubsystemTest.java index 9fb7a5fc..a7059c4e 100644 --- a/lib/src/test/java/com/team2813/lib2813/subsystems/ParameterizedIntakeSubsystemTest.java +++ b/lib/src/test/java/com/team2813/lib2813/subsystems/ParameterizedIntakeSubsystemTest.java @@ -6,9 +6,9 @@ import com.team2813.lib2813.control.ControlMode; import com.team2813.lib2813.control.PIDMotor; +import com.team2813.lib2813.testing.FakePIDMotor; import com.team2813.lib2813.testing.junit.jupiter.CommandTester; import com.team2813.lib2813.testing.junit.jupiter.WPILibExtension; -import com.team2813.lib2813.util.FakePIDMotor; import edu.wpi.first.wpilibj2.command.Command; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/testing/build.gradle b/testing/build.gradle index 35a57d43..4cb56e84 100644 --- a/testing/build.gradle +++ b/testing/build.gradle @@ -11,6 +11,7 @@ dependencies { implementation 'com.google.truth:truth:1.4.4' implementation(platform('org.junit:junit-bom:5.13.1')) implementation('org.junit.jupiter:junit-jupiter') + implementation project(':lib') nativeDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.desktop) nativeDebug wpi.java.vendor.jniDebug(wpi.platforms.desktop) simulationDebug wpi.sim.enableDebug() diff --git a/lib/src/main/java/com/team2813/lib2813/util/FakePIDMotor.java b/testing/src/main/java/com/team2813/lib2813/testing/FakePIDMotor.java similarity index 96% rename from lib/src/main/java/com/team2813/lib2813/util/FakePIDMotor.java rename to testing/src/main/java/com/team2813/lib2813/testing/FakePIDMotor.java index a8076f8c..b3d90037 100644 --- a/lib/src/main/java/com/team2813/lib2813/util/FakePIDMotor.java +++ b/testing/src/main/java/com/team2813/lib2813/testing/FakePIDMotor.java @@ -1,4 +1,4 @@ -package com.team2813.lib2813.util; +package com.team2813.lib2813.testing; import com.google.common.truth.Truth; import com.team2813.lib2813.control.ControlMode; From fe682b4b29093095fa342e14c4a8167a33579084 Mon Sep 17 00:00:00 2001 From: Katy Yeh Date: Thu, 2 Oct 2025 01:09:01 +0000 Subject: [PATCH 3/3] update ParameterizedIntakeSubsystem to take in Motor instead of PIDmotor --- .../lib2813/subsystems/ParameterizedIntakeSubsystem.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/main/java/com/team2813/lib2813/subsystems/ParameterizedIntakeSubsystem.java b/lib/src/main/java/com/team2813/lib2813/subsystems/ParameterizedIntakeSubsystem.java index 7faeeb00..ad890292 100644 --- a/lib/src/main/java/com/team2813/lib2813/subsystems/ParameterizedIntakeSubsystem.java +++ b/lib/src/main/java/com/team2813/lib2813/subsystems/ParameterizedIntakeSubsystem.java @@ -2,13 +2,13 @@ import com.google.auto.value.AutoBuilder; import com.team2813.lib2813.control.ControlMode; -import com.team2813.lib2813.control.PIDMotor; +import com.team2813.lib2813.control.Motor; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.InstantCommand; import edu.wpi.first.wpilibj2.command.SubsystemBase; public abstract class ParameterizedIntakeSubsystem extends SubsystemBase implements AutoCloseable { - private final PIDMotor intakeMotor; + private final Motor intakeMotor; private final Params params; public record Params(ControlMode controlMode, double intakeDemand, double outtakeDemand) { @@ -46,7 +46,7 @@ public interface Builder { } } - protected ParameterizedIntakeSubsystem(PIDMotor intakeMotor, Params params) { + protected ParameterizedIntakeSubsystem(Motor intakeMotor, Params params) { this.intakeMotor = intakeMotor; this.params = params; }