Skip to content

Commit 9bc2a12

Browse files
authored
Merge pull request #42 from rundeck-plugins/grails7-upgrade
Grails 7 Migration - Rundeck 6.0 Compatibility
2 parents a299955 + 3b3c4ba commit 9bc2a12

9 files changed

Lines changed: 55 additions & 19 deletions

File tree

.github/workflows/gradle.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v6
11+
- uses: actions/checkout@v4
1212
with:
1313
fetch-depth: 0
1414
- name: Get Fetch Tags
1515
run: git -c protocol.version=2 fetch --tags --progress --no-recurse-submodules origin
1616
if: "!contains(github.ref, 'refs/tags')"
17-
- name: Set up JDK 11
17+
- name: Set up JDK 17
1818
uses: actions/setup-java@v4
1919
with:
20-
java-version: '11'
20+
java-version: '17'
2121
distribution: 'zulu'
2222
- name: Grant execute permission for gradlew
2323
run: chmod +x gradlew

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ on:
22
push:
33
# Sequence of patterns matched against refs/tags
44
tags:
5-
- 'v[0-9]+.[0-9]+.[0-9]+' # Push events to matching v*, i.e. v1.0, v20.15.10
5+
- '*.*.*' # Push events to matching semver tags (no v prefix)
66

77
name: Publish Release
88

@@ -12,13 +12,13 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v6
15+
uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
18-
- name: Set up JDK 11
18+
- name: Set up JDK 17
1919
uses: actions/setup-java@v4
2020
with:
21-
java-version: '11'
21+
java-version: '17'
2222
distribution: 'zulu'
2323
- name: Build with Gradle
2424
run: ./gradlew build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/build
66
.idea
77
out
8+
bin

build.gradle

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
alias(libs.plugins.nexusPublish)
77
}
88

9-
group = 'org.rundeck.plugins'
9+
group = 'com.rundeck.plugins'
1010
ext.pluginClassNames = 'org.rundeck.plugins.nodes.icon.IconNodeEnhancer,org.rundeck.plugins.nodes.attributes.AttributeNodeEnhancer'
1111
ext.pluginName = 'Attribute Node Enhancer'
1212
ext.publishDescription = 'Adds icons to nodes based on attribute values'
@@ -18,15 +18,16 @@ ext.developers = [
1818

1919
scmVersion {
2020
tag {
21-
//defines release tags like "v1.2.3"
22-
prefix = 'v'
21+
prefix = '' // NO "v" prefix - see PLUGIN_TAGGING_ARCHITECTURE.md
2322
versionSeparator = ''
2423
}
2524
ignoreUncommittedChanges = true
25+
branchVersionCreator = ['main': 'simple', 'master': 'simple'] // Don't append branch name
26+
versionCreator 'simple' // Use simple version creator (just tag name)
2627
}
2728

2829
allprojects {
29-
project.version = scmVersion.version
30+
project.version = scmVersion.version // Dynamic version from git tag
3031
apply from: "${rootDir}/gradle/java.gradle"
3132
}
3233

@@ -50,6 +51,13 @@ jar {
5051
}
5152
test {
5253
useJUnitPlatform()
54+
55+
// Java 17+ module access for cglib/Spock mocking
56+
jvmArgs = [
57+
'--add-opens=java.base/java.lang=ALL-UNNAMED',
58+
'--add-opens=java.base/java.util=ALL-UNNAMED',
59+
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED'
60+
]
5361
}
5462

5563
dependencies {
@@ -74,11 +82,19 @@ configurations.all {
7482

7583
// In this section you declare where to find the dependencies of your project
7684
repositories {
85+
mavenLocal()
86+
maven {
87+
name = 'Central Portal Snapshots'
88+
url = 'https://central.sonatype.com/repository/maven-snapshots/'
89+
content {
90+
includeGroup('org.rundeck')
91+
}
92+
}
7793
mavenCentral()
7894
}
7995

8096
nexusPublishing {
81-
packageGroup = 'org.rundeck.plugins'
97+
packageGroup = 'com.rundeck.plugins'
8298
repositories {
8399
sonatype {
84100
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))

gradle/java.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
java {
2-
sourceCompatibility = JavaVersion.VERSION_11
2+
sourceCompatibility = JavaVersion.VERSION_17
3+
targetCompatibility = JavaVersion.VERSION_17
34
withJavadocJar()
45
withSourcesJar()
56
}

gradle/libs.versions.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[versions]
22
axionRelease = "1.18.18"
3-
groovy = "3.0.24"
4-
rundeckCore = "5.19.0-20260202"
3+
groovy = "4.0.29"
4+
rundeckCore = "6.0.0-SNAPSHOT"
55
nexusPublish = "2.0.0"
6-
spock = "2.3-groovy-3.0"
6+
spock = "2.4-groovy-4.0"
77
# Security overrides for transitive dependencies
8-
commonsLang3 = "3.18.0"
8+
commonsLang3 = "3.20.0"
99

1010
[libraries]
1111
rundeckCore = { group = "org.rundeck", name = "rundeck-core", version.ref = "rundeckCore" }
12-
groovyAll = { group = "org.codehaus.groovy", name = "groovy-all", version.ref = "groovy" }
12+
groovyAll = { group = "org.apache.groovy", name = "groovy-all", version.ref = "groovy" }
1313
spockCore = { group = "org.spockframework", name = "spock-core", version.ref = "spock" }
1414
commonsLang3 = { group = "org.apache.commons", name = "commons-lang3", version.ref = "commonsLang3" }
1515

gradle/publishing.gradle

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,22 @@ publishing {
5555

5656
}
5757
}
58+
repositories {
59+
def pkgcldWriteToken = System.getenv("PKGCLD_WRITE_TOKEN") ?: project.findProperty("pkgcldWriteToken")
60+
if (pkgcldWriteToken) {
61+
maven {
62+
name = "PackageCloudTest"
63+
url = uri("https://packagecloud.io/pagerduty/rundeckpro-test/maven2")
64+
authentication {
65+
header(HttpHeaderAuthentication)
66+
}
67+
credentials(HttpHeaderCredentials) {
68+
name = "Authorization"
69+
value = "Bearer " + pkgcldWriteToken
70+
}
71+
}
72+
}
73+
}
5874
}
5975
def base64Decode = { String prop ->
6076
project.findProperty(prop) ?
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

jitpack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jdk:
2+
- openjdk17

0 commit comments

Comments
 (0)