@@ -6,6 +6,8 @@ plugins {
6
6
id ' com.github.hierynomus.license' version ' 0.16.1'
7
7
id ' com.github.spotbugs' version " 6.0.14"
8
8
id ' maven-publish'
9
+ id ' signing'
10
+ id ' io.github.gradle-nexus.publish-plugin' version ' 2.0.0'
9
11
}
10
12
11
13
allprojects {
@@ -140,17 +142,17 @@ configure(publishedProjects) {
140
142
artifact javadocJar
141
143
}
142
144
}
143
- repositories {
144
- maven {
145
- def releaseUrl = " https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2"
146
- def snapshotUrl = " https://central.sonatype.com/repository/maven-snapshots/"
147
- url = isReleaseVersion ? releaseUrl : snapshotUrl
148
- credentials {
149
- username System . getenv(' MAVEN_CENTRAL_USERNAME' )
150
- password System . getenv(' MAVEN_CENTRAL_PASSWORD' )
151
- }
152
- }
153
- }
145
+ // repositories {
146
+ // maven {
147
+ // def releaseUrl = "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2"
148
+ // def snapshotUrl = "https://central.sonatype.com/repository/maven-snapshots/"
149
+ // url = isReleaseVersion ? releaseUrl : snapshotUrl
150
+ // credentials {
151
+ // username System.getenv('MAVEN_CENTRAL_USERNAME')
152
+ // password System.getenv('MAVEN_CENTRAL_PASSWORD')
153
+ // }
154
+ // }
155
+ // }
154
156
}
155
157
156
158
signing {
@@ -186,7 +188,18 @@ configure(publishedProjects) {
186
188
}
187
189
188
190
task ship () {
189
- dependsOn(' :core-api:ship' , ' :core-httpclient-impl:ship' )
191
+ dependsOn(' :core-httpclient-impl:ship' , ' :core-api:ship' , ' publishToSonatype' , ' closeSonatypeStagingRepository' )
192
+ }
193
+
194
+ nexusPublishing {
195
+ repositories {
196
+ sonatype {
197
+ nexusUrl. set(uri(' https://ossrh-staging-api.central.sonatype.com/service/local/' ))
198
+ snapshotRepositoryUrl. set(uri(' https://central.sonatype.com/repository/maven-snapshots/' ))
199
+ username = System . getenv(' MAVEN_CENTRAL_USERNAME' )
200
+ password = System . getenv(' MAVEN_CENTRAL_PASSWORD' )
201
+ }
202
+ }
190
203
}
191
204
192
205
task jacocoMerge (type : JacocoMerge ) {
0 commit comments