@@ -9,10 +9,10 @@ buildscript {
99plugins {
1010 id ' base'
1111 id ' pl.allegro.tech.build.axion-release' version ' 1.17.2'
12- id ' maven- publish'
12+ id ' io.github.gradle-nexus. publish-plugin ' version ' 2.0.0 '
1313}
1414
15- group = ' com .rundeck.plugins'
15+ group = ' org .rundeck.plugins'
1616
1717ext. pluginName = ' kubernetes'
1818ext. pluginDescription = " Kubernetes Rundeck Plugin to manage pods , deployments, etc"
@@ -32,6 +32,11 @@ scmVersion {
3232}
3333
3434version = scmVersion. version // Dynamic version from git tag
35+ ext. publishName = " Kubernetes ${ project.version} "
36+ ext. githubSlug = ' rundeck-plugins/kubernetes'
37+ ext. developers = [
38+ [id : ' gschueler' , name : ' Greg Schueler' , email : ' greg@rundeck.com' ]
39+ ]
3540
3641// ZIP plugin task - must use Jar type for proper manifest handling
3742task pluginZip (type : Jar ) {
@@ -95,35 +100,14 @@ pluginZip.doFirst {
95100// Wire into build lifecycle
96101assemble. dependsOn pluginZip
97102
98- publishing {
99- publications {
100- mavenZip(MavenPublication ) {
101- groupId = ' com.rundeck.plugins'
102- artifactId = ' kubernetes'
103- version = project. version
104-
105- artifact(pluginZip) {
106- extension = ' jar' // Publish as .jar to Maven (it's actually a zip)
107- }
108-
109- pom {
110- packaging = ' jar'
111- }
112- }
113- }
114-
103+ nexusPublishing {
104+ packageGroup = ' org.rundeck.plugins'
115105 repositories {
116- maven {
117- name = " PackageCloudTest"
118- url = uri(" https://packagecloud.io/pagerduty/rundeckpro-test/maven2" )
119- authentication {
120- header(HttpHeaderAuthentication )
121- }
122- credentials(HttpHeaderCredentials ) {
123- name = " Authorization"
124- value = " Bearer " + (System . getenv(" PKGCLD_WRITE_TOKEN" ) ?: project. findProperty(" pkgcldWriteToken" ))
125- }
106+ sonatype {
107+ nexusUrl. set(uri(" https://ossrh-staging-api.central.sonatype.com/service/local/" ))
108+ snapshotRepositoryUrl. set(uri(" https://central.sonatype.com/repository/maven-snapshots/" ))
126109 }
127110 }
128111}
129112
113+ apply from : " ${ rootDir} /gradle/publishing.gradle"
0 commit comments