@@ -2,10 +2,16 @@ plugins {
22 id ' pl.allegro.tech.build.axion-release' version ' 1.17.2'
33 id ' groovy'
44 id ' java'
5- id ' maven- publish'
5+ id ' io.github.gradle-nexus. publish-plugin ' version ' 2.0.0 '
66}
77
8- group ' com.rundeck.plugins'
8+ group ' org.rundeck.plugins'
9+
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+ ]
915
1016scmVersion {
1117 ignoreUncommittedChanges = false
@@ -17,8 +23,12 @@ scmVersion {
1723
1824version = scmVersion. version // Dynamic version from git tag
1925
20- sourceCompatibility = 17
21- targetCompatibility = 17
26+ java {
27+ sourceCompatibility = JavaVersion . VERSION_17
28+ targetCompatibility = JavaVersion . VERSION_17
29+ withSourcesJar()
30+ withJavadocJar()
31+ }
2232ext. rundeckPluginVersion = ' 1.2'
2333ext. pluginClassNames= ' com.rundeck.plugin.HttpNotificationPlugin'
2434ext. pluginName = ' Http Notification'
@@ -47,15 +57,16 @@ repositories {
4757 name = " PackageCloudTest"
4858 url = uri(" https://packagecloud.io/pagerduty/rundeckpro-test/maven2" )
4959 content {
50- includeGroup(' com .rundeck.plugins' )
60+ includeGroup(' org .rundeck.plugins' )
5161 }
5262 }
5363 mavenCentral()
5464}
5565
5666dependencies {
5767 implementation ' org.apache.groovy:groovy-all:4.0.29'
58- implementation ' org.rundeck:rundeck-core:6.0.0-SNAPSHOT'
68+ compileOnly ' org.rundeck:rundeck-core:6.0.0-SNAPSHOT'
69+ testImplementation ' org.rundeck:rundeck-core:6.0.0-SNAPSHOT'
5970
6071 // Apache HTTP client dependencies for compilation (http-step bundles these but doesn't expose them transitively)
6172 implementation ' org.apache.httpcomponents:httpclient:4.5.14'
@@ -64,7 +75,7 @@ dependencies {
6475
6576 // Bundle http-step plugin in lib/ directory for runtime
6677 // Use transitive=false to avoid duplicating dependencies already bundled in http-step JAR
67- pluginLibs (' com .rundeck.plugins:http-step:1.1.20-grails7' ) {
78+ pluginLibs (' org .rundeck.plugins:http-step:1.1.20-grails7' ) {
6879 transitive = false
6980 }
7081
@@ -112,27 +123,14 @@ test {
112123 ]
113124}
114125
115- publishing {
116- publications {
117- maven(MavenPublication ) {
118- groupId = ' com.rundeck.plugins'
119- artifactId = ' http-notification'
120- version = project. version
121- from components. java
122- }
123- }
124-
126+ nexusPublishing {
127+ packageGroup = ' org.rundeck.plugins'
125128 repositories {
126- maven {
127- name = " PackageCloudTest"
128- url = uri(" https://packagecloud.io/pagerduty/rundeckpro-test/maven2" )
129- authentication {
130- header(HttpHeaderAuthentication )
131- }
132- credentials(HttpHeaderCredentials ) {
133- name = " Authorization"
134- value = " Bearer " + (System . getenv(" PKGCLD_WRITE_TOKEN" ) ?: project. findProperty(" pkgcldWriteToken" ))
135- }
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/" ))
136132 }
137133 }
138134}
135+
136+ apply from : " ${ rootDir} /gradle/publishing.gradle"
0 commit comments