@@ -30,7 +30,8 @@ plugins {
3030 id " biz.aQute.bnd.builder" version " 6.3.1" apply false
3131 id " org.sonarqube" version " 3.4.0.2513"
3232 id " jacoco"
33- id ' io.codearte.nexus-staging' version ' 0.30.0'
33+ // id 'io.codearte.nexus-staging' version '0.30.0'
34+ id " io.github.gradle-nexus.publish-plugin" version ' 1.1.0'
3435}
3536
3637sonarqube {
@@ -172,28 +173,39 @@ subprojects {
172173 }
173174 }
174175 }
176+ // repositories {
177+ // maven {
178+ // name 'ossrh'
179+ // if (version.toString().endsWith("-SNAPSHOT")) {
180+ // url "https://oss.sonatype.org/content/repositories/snapshots/"
181+ // } else {
182+ // url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
183+ // }
184+ // credentials {
185+ // username = System.env.OSS_USER_TOKEN_KEY ?: project.findProperty('OSS_USER_TOKEN_KEY') ?: ''
186+ // password = System.env.OSS_USER_TOKEN_PASS ?: project.findProperty('OSS_USER_TOKEN_PASS') ?: ''
187+ // }
188+ // }
189+ // }
190+ }
191+
192+ nexusPublishing {
175193 repositories {
176- maven {
177- name ' ossrh'
178- if (version. toString(). endsWith(" -SNAPSHOT" )) {
179- url " https://oss.sonatype.org/content/repositories/snapshots/"
180- } else {
181- url " https://oss.sonatype.org/service/local/staging/deploy/maven2"
182- }
183- credentials {
184- username = System . env. OSS_USER_TOKEN_KEY ?: project. findProperty(' OSS_USER_TOKEN_KEY' ) ?: ' '
185- password = System . env. OSS_USER_TOKEN_PASS ?: project. findProperty(' OSS_USER_TOKEN_PASS' ) ?: ' '
186- }
194+ myNexus {
195+ nexusUrl = uri(" https://oss.sonatype.org/service/local/staging/deploy/maven2" )
196+ snapshotRepositoryUrl = uri(" https://oss.sonatype.org/content/repositories/snapshots/" )
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' ) ?: ' '
187199 }
188200 }
189201 }
190202 }
191203}
192204
193- nexusStaging {
194- username = System . env. OSS_USER_TOKEN_KEY ?: project. findProperty(' OSS_USER_TOKEN_KEY' ) ?: ' '
195- password = System . env. OSS_USER_TOKEN_PASS ?: project. findProperty(' OSS_USER_TOKEN_PASS' ) ?: ' '
196- }
205+ // nexusStaging {
206+ // username = System.env.OSS_USER_TOKEN_KEY ?: project.findProperty('OSS_USER_TOKEN_KEY') ?: ''
207+ // password = System.env.OSS_USER_TOKEN_PASS ?: project.findProperty('OSS_USER_TOKEN_PASS') ?: ''
208+ // }
197209
198210wrapper {
199211 distributionType = Wrapper.DistributionType . ALL
0 commit comments