@@ -2,8 +2,7 @@ plugins {
22 id ' groovy'
33 id ' maven-publish'
44 id ' java-gradle-plugin'
5- id ' signing'
6- id ' io.github.gradle-nexus.publish-plugin' version ' 2.0.0'
5+ id ' org.jreleaser' version ' 1.18.0'
76 id ' com.gradle.plugin-publish' version ' 1.3.1'
87}
98
@@ -54,46 +53,67 @@ java {
5453}
5554
5655afterEvaluate {
57- publishing. publications. forEach {
58- it. pom {
59- name = ' Gradle Docker Java Plugin'
60- description = ' Gradle plugin that wraps your JVM application to a new Docker image.'
61- url = ' https://github.com/augi/gradle-docker-java'
62- licenses {
63- license {
64- name = ' The MIT License'
65- url = ' http://www.opensource.org/licenses/mit-license.php'
56+ publishing {
57+ publications. forEach {
58+ it. pom {
59+ name = ' Gradle Docker Java Plugin'
60+ description = ' Gradle plugin that wraps your JVM application to a new Docker image.'
61+ url = ' https://github.com/augi/gradle-docker-java'
62+ licenses {
63+ license {
64+ name = ' The MIT License'
65+ url = ' http://www.opensource.org/licenses/mit-license.php'
66+ }
6667 }
67- }
68- developers {
69- developer {
70- id = ' augi'
71- name = ' Michal Augustýn'
72- 68+ developers {
69+ developer {
70+ id = ' augi'
71+ name = ' Michal Augustýn'
72+ 73+ }
74+ }
75+ scm {
76+ connection = ' scm:git:git://github.com/augi/gradle-docker-java.git'
77+ developerConnection = ' scm:git:ssh://github.com/augi/gradle-docker-java.git'
78+ url = ' https://github.com/augi/gradle-docker-java'
7379 }
7480 }
75- scm {
76- connection = ' scm:git:git://github.com/augi/gradle-docker-java.git '
77- developerConnection = ' scm:git:ssh://github.com/augi/gradle-docker-java.git '
78- url = ' https://github.com/augi/gradle-docker-java '
81+ }
82+ repositories {
83+ maven {
84+ url = layout . buildDirectory . dir( ' staging-deploy ' )
7985 }
8086 }
8187 }
8288}
8389
84- signing {
85- String base64Key = System . getenv(' SIGNING_KEY' )
86- if (base64Key) {
87- useInMemoryPgpKeys(new String (Base64 . decoder. decode(base64Key)), System . getenv(' SIGNING_PASSWORD' ))
88- sign publishing. publications
90+ jreleaser {
91+ signing {
92+ active = ' ALWAYS'
93+ armored = true
94+ String base64Key = System . getenv(' SIGNING_KEY' )
95+ if (base64Key) {
96+ secretKey = new String (Base64 . decoder. decode(base64Key))
97+ }
98+ String base64PublicKey = System . getenv(' SIGNING_PUBLIC_KEY' )
99+ if (base64PublicKey) {
100+ publicKey = new String (Base64 . decoder. decode(base64PublicKey))
101+ }
89102 }
90- }
91-
92- nexusPublishing {
93- repositories {
94- sonatype {
95- nexusUrl. set(uri(" https://s01.oss.sonatype.org/service/local/" ))
96- snapshotRepositoryUrl. set(uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" ))
103+ deploy {
104+ maven {
105+ mavenCentral {
106+ sonatype {
107+ active = ' ALWAYS'
108+ url = ' https://central.sonatype.com/api/v1/publisher'
109+ stagingRepository(' build/staging-deploy' )
110+ }
111+ }
112+ }
113+ }
114+ release {
115+ github {
116+ enabled = false
97117 }
98118 }
99119}
0 commit comments