Skip to content

Commit 6dcff9a

Browse files
committed
added nexus publish plugin
1 parent 35eba73 commit 6dcff9a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

build.gradle

Lines changed: 7 additions & 7 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'
@@ -192,16 +193,15 @@ publishing {
192193
}
193194
}
194195
}
196+
}
195197

198+
nexusPublishing {
196199
repositories {
197200
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')
204-
}
201+
nexusUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
202+
snapshotRepositoryUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
203+
username = System.getenv('SONATYPE_USERNAME')
204+
password = System.getenv('SONATYPE_PASSWORD')
205205
}
206206
}
207207
}

0 commit comments

Comments
 (0)