From 53f35e34b9fcbe3088f61d39742a35c029cb6c38 Mon Sep 17 00:00:00 2001 From: Kevin Cooney Date: Wed, 24 Sep 2025 19:28:41 -0700 Subject: [PATCH] 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;