Skip to content

Commit 1377ce1

Browse files
committed
added nexus publish plugin
1 parent 35eba73 commit 1377ce1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
id 'java'
33
id 'idea'
44
id 'maven-publish'
5+
id "de.marcphilipp.nexus-publish" version "0.4.0"
56
id 'signing'
67
id 'com.github.sherter.google-java-format' version '0.7.1'
78
id 'io.codearte.nexus-staging' version '0.12.0'
@@ -193,14 +194,13 @@ publishing {
193194
}
194195
}
195196

196-
repositories {
197-
maven {
198-
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
199-
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
200-
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
201-
credentials {
202-
username System.getenv('SONATYPE_USERNAME')
203-
password System.getenv('SONATYPE_PASSWORD')
197+
nexusPublishing {
198+
repositories {
199+
maven {
200+
nexusUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
201+
snapshotRepositoryUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
202+
username = System.getenv('SONATYPE_USERNAME')
203+
password = System.getenv('SONATYPE_PASSWORD')
204204
}
205205
}
206206
}

0 commit comments

Comments
 (0)