diff --git a/.gitignore b/.gitignore index 6e77973..4b2be17 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ .gradle -/build/ +build/ + +lib/bin # Ignore Gradle GUI config gradle-app.setting diff --git a/README.md b/README.md index 5356c5e..d8d0d21 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,8 @@ The official library for Team 578 R3 - Red Raider Robotics To include this library in a Java FRC Robot project. # Building +The project can be built and published to the local Maven repository using `./gradlew pubLocal` -The project can be build and published to the local Maven repository using `./gradlew publishToMavenLocal` + +## Updating version +The version tag can be found in `lib/publish.gradle`. When updating the version match the year to the current year, and increment the major and minor version as needed. diff --git a/lib/bin/main/com/fairportrobotics/frc/poe/DriveSystems/SwerveDrive/SwerveDriveSubsystem.class b/lib/bin/main/com/fairportrobotics/frc/poe/DriveSystems/SwerveDrive/SwerveDriveSubsystem.class deleted file mode 100644 index 2638265..0000000 Binary files a/lib/bin/main/com/fairportrobotics/frc/poe/DriveSystems/SwerveDrive/SwerveDriveSubsystem.class and /dev/null differ diff --git a/lib/bin/main/com/fairportrobotics/frc/poe/Library.class b/lib/bin/main/com/fairportrobotics/frc/poe/Library.class deleted file mode 100644 index 43268ae..0000000 Binary files a/lib/bin/main/com/fairportrobotics/frc/poe/Library.class and /dev/null differ diff --git a/lib/bin/test/com/fairportrobotics/frc/poe/LibraryTest.class b/lib/bin/test/com/fairportrobotics/frc/poe/LibraryTest.class deleted file mode 100644 index beb9663..0000000 Binary files a/lib/bin/test/com/fairportrobotics/frc/poe/LibraryTest.class and /dev/null differ diff --git a/lib/publish.gradle b/lib/publish.gradle index cf28cc2..bd49a07 100644 --- a/lib/publish.gradle +++ b/lib/publish.gradle @@ -1,8 +1,10 @@ +import org.gradle.internal.os.OperatingSystem + apply plugin: 'maven-publish' ext.licenseFile = files("$rootDir/LICENSE.txt") -def pubVersion = '2022.0.1' +def pubVersion = '2023.1.0' def outputsFolder = file("$buildDir/allOutputs") @@ -25,6 +27,8 @@ task outputVersions() { task libraryBuild() {} +task pubLocal(dependsOn: 'publishAllPublicationsToFrcHomeRepository') {} + build.dependsOn outputVersions task copyAllOutputs(type: Copy) { @@ -95,6 +99,22 @@ libraryBuild.dependsOn build def releasesRepoUrl = "$buildDir/repos/releases" +String frcYear = '2023' +File frcHome +if (OperatingSystem.current().isWindows()) { + String publicFolder = System.getenv('PUBLIC') + if (publicFolder == null) { + publicFolder = "C:\\Users\\Public" + } + def homeRoot = new File(publicFolder, "wpilib") + frcHome = new File(homeRoot, frcYear) +} else { + def userFolder = System.getProperty("user.home") + def homeRoot = new File(userFolder, "wpilib") + frcHome = new File(homeRoot, frcYear) +} +def frcHomeMaven = new File(frcHome, 'maven') + publishing { repositories { maven { @@ -105,6 +125,11 @@ publishing { password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") } } + + maven { + name 'frcHome' + url frcHomeMaven + } } }