Skip to content

Commit 6d417fa

Browse files
committed
Removed Nexus Plugin
1 parent eedec7d commit 6d417fa

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

build.gradle

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff 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+
219220
signing {
220221
sign publishing.publications.mavenJava
221222
sign configurations.archives

0 commit comments

Comments
 (0)