Skip to content

Commit

Permalink
Switch plugin to publish as GradleRIO2027 (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse authored Nov 30, 2024
1 parent 4bc59cc commit 66d97fe
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ For mid-season updates to GradleRio, edit build.gradle and replace the version i
```gradle
plugins {
// ... other plugins ...
id "edu.wpi.first.GradleRIO" version "REPLACE ME WITH THE LATEST VERSION"
id "edu.wpi.first.GradleRIO2027" version "REPLACE ME WITH THE LATEST VERSION"
}
```

Expand Down Expand Up @@ -155,6 +155,6 @@ To use a custom build of GradleRIO in a robot project, the build must be publish
```gradle
plugins {
// ... other plugins ...
id "edu.wpi.first.GradleRIO" version "REPLACE ME WITH THE PUBLISHED VERSION"
id "edu.wpi.first.GradleRIO2027" version "REPLACE ME WITH THE PUBLISHED VERSION"
}
```
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ gradlePlugin {
vcsUrl = 'https://github.com/wpilibsuite/GradleRIO'
plugins {
gradleRio {
id = 'edu.wpi.first.GradleRIO'
displayName = 'GradleRIO'
id = 'edu.wpi.first.GradleRIO2027'
displayName = 'GradleRIO2027'
implementationClass = 'edu.wpi.first.gradlerio.GradleRIOPlugin'
description = 'Managing FRC projects, the Gradle way (2019+)'
tags = ['frc', 'wpilib', 'gradlerio']
Expand All @@ -78,14 +78,14 @@ def examplesFolder = file("$rootDir/testing")

tasks.register('PatchExamples') {
doLast {
String regex = "(id\\s*?[\\\"|\\']edu\\.wpi\\.first\\.GradleRIO[\\\"|\\'].*?version\\s*?[\\\"|\\'])(.+?)([\\\"|\\'])";
String regex = "(id\\s*?[\\\"|\\']edu\\.wpi\\.first\\.GradleRIO2027[\\\"|\\'].*?version\\s*?[\\\"|\\'])(.+?)([\\\"|\\'])";

examplesFolder.eachFile { File file ->
if (file.isDirectory() && file.name != '_archived') {
def buildGradleFile = new File(file, 'build.gradle')
if (buildGradleFile.exists() && buildGradleFile.isFile()) {
def text = buildGradleFile.text
text = text.replaceAll(regex, "id \"edu.wpi.first.GradleRIO\" version \"${version}\"")
text = text.replaceAll(regex, "id \"edu.wpi.first.GradleRIO2027\" version \"${version}\"")
buildGradleFile.text = text
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = 2025.1.1-beta-2
version = 2025.1.1-alpha-1
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'GradleRIO2027'
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GradleRioInitializationTest extends Specification {
buildFile << """
plugins {
id 'cpp'
id 'edu.wpi.first.GradleRIO'
id 'edu.wpi.first.GradleRIO2027'
}
"""
buildFile2 << ""
Expand All @@ -44,7 +44,7 @@ plugins {
buildFile << """
plugins {
id 'java'
id 'edu.wpi.first.GradleRIO'
id 'edu.wpi.first.GradleRIO2027'
}
"""
buildFile2 << ""
Expand All @@ -65,7 +65,7 @@ plugins {
buildFile2 << """
plugins {
id 'cpp'
id 'edu.wpi.first.GradleRIO'
id 'edu.wpi.first.GradleRIO2027'
}
"""
buildFile << ""
Expand All @@ -86,7 +86,7 @@ plugins {
buildFile2 << """
plugins {
id 'java'
id 'edu.wpi.first.GradleRIO'
id 'edu.wpi.first.GradleRIO2027'
}
"""
buildFile << ""
Expand Down
2 changes: 1 addition & 1 deletion testing/_archived/coprocessor_cpp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// but it makes the plugins available for subprojects.
plugins {
// GradleRIO is used for code intended to go on robots, which is why it's only applied to the 'robot' project.
id "edu.wpi.first.GradleRIO" version "<REPLACEME latest>" apply false
id "edu.wpi.first.GradleRIO2027" version "<REPLACEME latest>" apply false

// DeployUtils is the backing library for GradleRIO, and includes everything that's non-frc specific, which
// is why we use it for our coprocessor project.
Expand Down
2 changes: 1 addition & 1 deletion testing/_archived/coprocessor_java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// but it makes the plugins available for subprojects.
plugins {
// GradleRIO is used for code intended to go on robots, which is why it's only applied to the 'robot' project.
id "edu.wpi.first.GradleRIO" version "<REPLACEME latest>" apply false
id "edu.wpi.first.GradleRIO2027" version "<REPLACEME latest>" apply false

// DeployUtils is the backing library for GradleRIO, and includes everything that's non-frc specific, which
// is why we use it for our coprocessor project.
Expand Down
2 changes: 1 addition & 1 deletion testing/asm/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

plugins {
id "assembler"
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-2"
id "edu.wpi.first.GradleRIO2027" version "2025.1.1-alpha-1"
}

def projectFolder = project.buildFile.parentFile
Expand Down
2 changes: 1 addition & 1 deletion testing/cpp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
plugins {
id "cpp"
id "google-test-test-suite"
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-2"
id "edu.wpi.first.GradleRIO2027" version "2025.1.1-alpha-1"
}

def projectFolder = project.buildFile.parentFile
Expand Down
2 changes: 1 addition & 1 deletion testing/java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-2"
id "edu.wpi.first.GradleRIO2027" version "2025.1.1-alpha-1"
}

def projectFolder = project.buildFile.parentFile
Expand Down
2 changes: 1 addition & 1 deletion testing/jni/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "java"
id "cpp"
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-2"
id "edu.wpi.first.GradleRIO2027" version "2025.1.1-alpha-1"
id 'edu.wpi.first.GradleJni' version '0.10.1'
}

Expand Down
2 changes: 1 addition & 1 deletion testing/kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "org.jetbrains.kotlin.jvm" version "1.3.50"
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-2"
id "edu.wpi.first.GradleRIO2027" version "2025.1.1-alpha-1"
}

def ROBOT_MAIN_CLASS = "frc.team0000.robot.MainKt"
Expand Down

0 comments on commit 66d97fe

Please sign in to comment.