File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ plugins {
22 id ' java-library'
33 id ' idea'
44 id ' maven-publish'
5- id " de.marcphilipp.nexus-publish" version " 0.4.0"
65 id ' signing'
76 id ' com.github.sherter.google-java-format' version ' 0.8'
87 id ' io.codearte.nexus-staging' version ' 0.12.0'
@@ -203,19 +202,21 @@ publishing {
203202 }
204203 }
205204 }
206- }
207205
208- nexusPublishing {
209206 repositories {
210207 maven {
211- nexusUrl = uri(" https://oss.sonatype.org/service/local/staging/deploy/maven2/" )
212- snapshotRepositoryUrl = uri(" https://oss.sonatype.org/content/repositories/snapshots/" )
213- username = System . getenv(' SONATYPE_USERNAME' )
214- password = System . getenv(' SONATYPE_PASSWORD' )
208+ def releasesRepoUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
209+ def snapshotsRepoUrl = " https://oss.sonatype.org/content/repositories/snapshots/"
210+ url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
211+ credentials {
212+ username System . getenv(' SONATYPE_USERNAME' )
213+ password System . getenv(' SONATYPE_PASSWORD' )
214+ }
215215 }
216216 }
217217}
218218
219+
219220signing {
220221 sign publishing. publications. mavenJava
221222 sign configurations. archives
You can’t perform that action at this time.
0 commit comments