1-
2- buildscript {
3- repositories {
4- mavenCentral()
5- maven { url " https://oss.sonatype.org/content/groups/public" }
6- }
7- }
8-
91plugins {
10- id ' pl.allegro.tech.build.axion-release' version ' 1.13.4'
2+ id ' pl.allegro.tech.build.axion-release' version ' 1.17.2'
3+ id ' groovy'
4+ id ' java'
5+ id ' io.github.gradle-nexus.publish-plugin' version ' 2.0.0'
116}
127
13- group ' com.rundeck.plugin'
14-
15- apply plugin : ' pl.allegro.tech.build.axion-release'
16- apply plugin : ' groovy'
17- apply plugin : ' java'
18-
19- sourceCompatibility = 11
20- ext. rundeckPluginVersion = ' 1.2'
21- ext. pluginClassNames= ' com.rundeck.plugin.HttpNotificationPlugin'
22- ext. pluginName = ' Http Notification'
23- ext. pluginDescription = ' A notification plugin that makes HTTP requests'
8+ group ' org.rundeck.plugins'
249
10+ ext. publishName = " Http Notification ${ project.version} "
11+ ext. githubSlug = ' rundeck-plugins/http-notification'
12+ ext. developers = [
13+ [id : ' gschueler' , name : ' Greg Schueler' , email : ' greg@rundeck.com' ]
14+ ]
2515
2616scmVersion {
27- ignoreUncommittedChanges = true
17+ ignoreUncommittedChanges = false
2818 tag {
29- prefix = ' '
19+ prefix = ' ' // NO "v" prefix - see PLUGIN_TAGGING_ARCHITECTURE.md
3020 versionSeparator = ' '
31- def origDeserialize= deserialize
32- // apend .0 to satisfy semver if the tag version is only X.Y
33- deserialize = { config , position , tagName ->
34- def orig = origDeserialize(config, position, tagName)
35- if (orig. split(' \\ .' ). length < 3 ) {
36- orig + = " .0"
37- }
38- orig
39- }
4021 }
4122}
42- project. version = scmVersion. version
23+
24+ version = scmVersion. version // Dynamic version from git tag
25+
26+ java {
27+ sourceCompatibility = JavaVersion . VERSION_17
28+ targetCompatibility = JavaVersion . VERSION_17
29+ withSourcesJar()
30+ withJavadocJar()
31+ }
32+ ext. rundeckPluginVersion = ' 1.2'
33+ ext. pluginClassNames= ' com.rundeck.plugin.HttpNotificationPlugin'
34+ ext. pluginName = ' Http Notification'
35+ ext. pluginDescription = ' A notification plugin that makes HTTP requests'
4336
4437configurations {
4538 // declare custom pluginLibs configuration to include only libs for this plugin
@@ -52,54 +45,55 @@ configurations{
5245}
5346
5447repositories {
55- mavenCentral()
5648 mavenLocal()
57- maven { url ' https://jitpack.io' }
58-
59- }
60-
61- dependencies {
62- implementation ' org.rundeck:rundeck-core:5.14.0-rc1-20250722'
63-
64- pluginLibs (' com.github.rundeck-plugins:http-step:1.1.6' ){
65- exclude group : ' org.rundeck' , module : ' rundeck-core'
49+ maven {
50+ name = ' Central Portal Snapshots'
51+ url = ' https://central.sonatype.com/repository/maven-snapshots/'
52+ content {
53+ includeGroup(' org.rundeck' )
54+ }
6655 }
67-
68- implementation group : ' org.apache.httpcomponents' , name : ' httpclient' , version : ' 4.5.14'
69- implementation ' org.codehaus.groovy:groovy-all:3.0.9'
70-
71- // Add secure commons-lang3 to provide alternative to vulnerable commons-lang 2.6
72- implementation ' org.apache.commons:commons-lang3:3.18.0'
73-
74- testImplementation group : ' junit' , name : ' junit' , version : ' 4.13.1'
75-
76- testImplementation " org.codehaus.groovy:groovy-all:3.0.17"
77- testImplementation " org.spockframework:spock-core:2.0-groovy-3.0"
78- testImplementation " cglib:cglib-nodep:2.2.2"
79- testImplementation ' org.objenesis:objenesis:1.4'
80-
81- }
82-
83- configurations. all {
84- resolutionStrategy {
85- // Replace vulnerable commons-lang with secure commons-lang3
86- dependencySubstitution {
87- substitute module(' commons-lang:commons-lang' ) using module(' org.apache.commons:commons-lang3:3.18.0' )
56+ maven {
57+ name = " PackageCloudTest"
58+ url = uri(" https://packagecloud.io/pagerduty/rundeckpro-test/maven2" )
59+ content {
60+ includeGroup(' org.rundeck.plugins' )
8861 }
8962 }
63+ mavenCentral()
9064}
9165
66+ dependencies {
67+ implementation ' org.apache.groovy:groovy-all:4.0.29'
68+ compileOnly ' org.rundeck:rundeck-core:6.0.0-alpha1-20260407'
69+ testImplementation ' org.rundeck:rundeck-core:6.0.0-alpha1-20260407'
70+
71+ // Apache HTTP client dependencies for compilation (http-step bundles these but doesn't expose them transitively)
72+ implementation ' org.apache.httpcomponents:httpclient:4.5.14'
73+ // Version 3.18.0 fixes CVE-2025-48924 (StackOverflowError in ClassUtils)
74+ implementation ' org.apache.commons:commons-lang3:3.20.0'
75+
76+ // Bundle http-step plugin in lib/ directory for runtime
77+ // Use transitive=false to avoid duplicating dependencies already bundled in http-step JAR
78+ pluginLibs (' org.rundeck.plugins:http-step:1.1.20-grails7' ) {
79+ transitive = false
80+ }
9281
93- // task to copy plugin libs to output/lib dir
94- task copyToLib (type : Copy ) {
95- into " $buildDir /output/lib"
96- from configurations. pluginLibs
82+ testImplementation group : ' junit' , name : ' junit' , version : ' 4.13.2'
83+ testImplementation " org.apache.groovy:groovy-all:4.0.29"
84+ testImplementation " org.spockframework:spock-core:2.4-groovy-4.0"
85+ testImplementation " net.bytebuddy:byte-buddy:1.14.11"
86+ testImplementation ' org.objenesis:objenesis:3.4'
9787}
9888
9989
10090
10191jar {
102- from " $buildDir /output"
92+ // Include plugin dependencies in lib/ directory
93+ into(' lib' ) {
94+ from configurations. pluginLibs
95+ }
96+
10397 manifest {
10498 def libList = configurations. pluginLibs. collect{' lib/' + it. name}. join(' ' )
10599 attributes ' Rundeck-Plugin-Name' : pluginName
@@ -115,13 +109,28 @@ jar {
115109 attributes ' Rundeck-Plugin-Archive' : ' true'
116110 attributes ' Rundeck-Plugin-Libs' : " ${ libList} "
117111 }
118- dependsOn(copyToLib)
119112}
120113
114+ test {
115+ useJUnit()
116+
117+ // Java 17+ module access for reflection/mocking
118+ jvmArgs = [
119+ ' --add-opens=java.base/java.lang=ALL-UNNAMED' ,
120+ ' --add-opens=java.base/java.util=ALL-UNNAMED' ,
121+ ' --add-opens=java.base/java.lang.reflect=ALL-UNNAMED' ,
122+ ' --add-opens=java.base/java.net=ALL-UNNAMED'
123+ ]
124+ }
121125
122- // set jar task to depend on copyToLib
123- jar. dependsOn(copyToLib)
126+ nexusPublishing {
127+ packageGroup = ' org.rundeck.plugins'
128+ repositories {
129+ sonatype {
130+ nexusUrl. set(uri(" https://ossrh-staging-api.central.sonatype.com/service/local/" ))
131+ snapshotRepositoryUrl. set(uri(" https://central.sonatype.com/repository/maven-snapshots/" ))
132+ }
133+ }
134+ }
124135
125- tasks. withType(Test ) {
126- useJUnitPlatform()
127- }
136+ apply from : " ${ rootDir} /gradle/publishing.gradle"
0 commit comments