Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 09efaa5

Browse files
committed
chore: switch to nexus publishing plugin
1 parent bb38d44 commit 09efaa5

File tree

2 files changed

+9
-19
lines changed

2 files changed

+9
-19
lines changed

build.gradle

+8-18
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ plugins {
2424
id "org.springframework.boot" version "$LIB_SPRING_BOOT_VER" apply false
2525
id "org.sonarqube" version "$PLUGIN_SONARQUBE_VER"
2626
id "jacoco"
27-
id 'io.codearte.nexus-staging' version "$PLUGIN_NEXUS_STAGING_VER"
27+
id "io.github.gradle-nexus.publish-plugin" version "$PLUGIN_NEXUS_PUBLISH_VER"
2828
}
2929

3030
sonarqube {
@@ -188,26 +188,16 @@ subprojects {
188188
}
189189
}
190190
}
191-
repositories {
192-
maven {
193-
name 'ossrh'
194-
if (version.toString().endsWith("-SNAPSHOT")) {
195-
url "https://oss.sonatype.org/content/repositories/snapshots/"
196-
} else {
197-
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
198-
}
199-
credentials {
200-
username = System.env.OSS_USER_TOKEN_KEY ?: project.findProperty('OSS_USER_TOKEN_KEY') ?: ''
201-
password = System.env.OSS_USER_TOKEN_PASS ?: project.findProperty('OSS_USER_TOKEN_PASS') ?: ''
202-
}
203-
}
204-
}
205191
}
206192
}
207193

208-
nexusStaging {
209-
username = System.env.OSS_USER_TOKEN_KEY ?: project.findProperty('OSS_USER_TOKEN_KEY') ?: ''
210-
password = System.env.OSS_USER_TOKEN_PASS ?: project.findProperty('OSS_USER_TOKEN_PASS') ?: ''
194+
nexusPublishing {
195+
repositories {
196+
sonatype {
197+
username = System.env.OSS_USER_TOKEN_KEY ?: project.findProperty('OSS_USER_TOKEN_KEY') ?: ''
198+
password = System.env.OSS_USER_TOKEN_PASS ?: project.findProperty('OSS_USER_TOKEN_PASS') ?: ''
199+
}
200+
}
211201
}
212202

213203
wrapper {

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ LIB_JSOUP_VER=1.15.2
4242
### Plugins
4343
PLUGIN_JACOCO_VER=0.8.7
4444
PLUGIN_SONARQUBE_VER=3.4.0.2513
45-
PLUGIN_NEXUS_STAGING_VER=0.30.0
45+
PLUGIN_NEXUS_PUBLISH_VER=1.1.0
4646
PLUGIN_GOOGLE_JAVA_FORMAT_VER=0.9

0 commit comments

Comments
 (0)