@@ -13,6 +13,7 @@ plugins {
1313 val adarshrTestLoggerVersion = " 4.0.0"
1414 val sonarqubeVersion = " 4.4.1.3373"
1515 val gradleReleasePluginVersion = " 3.0.2"
16+ val gradleNexusPublishPluginVersion = " 2.0.0-rc-2"
1617
1718 kotlin(" jvm" ) version kotlinVersion
1819 id(" io.spring.dependency-management" ) version springDependencyManagementVersion
@@ -23,6 +24,7 @@ plugins {
2324 id(" maven-publish" )
2425 id(" signing" )
2526 id(" net.researchgate.release" ) version gradleReleasePluginVersion
27+ id(" io.github.gradle-nexus.publish-plugin" ) version gradleNexusPublishPluginVersion
2628}
2729
2830group = " io.github.tobi-laa"
@@ -87,6 +89,17 @@ tasks.jacocoTestReport {
8789 }
8890}
8991
92+ nexusPublishing {
93+ repositories {
94+ sonatype {
95+ nexusUrl.set(uri(" https://s01.oss.sonatype.org/service/local/" ))
96+ snapshotRepositoryUrl.set(uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" ))
97+ username = System .getenv(" OSSRH_USERNAME" )
98+ password = System .getenv(" OSSRH_TOKEN" )
99+ }
100+ }
101+ }
102+
90103publishing {
91104 publications {
92105 create<MavenPublication >(" mavenJava" ) {
@@ -136,18 +149,6 @@ publishing {
136149 }
137150 }
138151 }
139- repositories {
140- maven {
141- name = " ossrh"
142- val releasesRepoUrl = uri(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" )
143- val snapshotsRepoUrl = uri(" https://s01.oss.sonatype.org/content/repositories/snapshots" )
144- url = if (version.toString().endsWith(" SNAPSHOT" )) snapshotsRepoUrl else releasesRepoUrl
145- credentials {
146- username = System .getenv(" OSSRH_USERNAME" )
147- password = System .getenv(" OSSRH_TOKEN" )
148- }
149- }
150- }
151152}
152153
153154signing {
0 commit comments