@@ -13,6 +13,7 @@ plugins {
13
13
val adarshrTestLoggerVersion = " 4.0.0"
14
14
val sonarqubeVersion = " 4.4.1.3373"
15
15
val gradleReleasePluginVersion = " 3.0.2"
16
+ val gradleNexusPublishPluginVersion = " 2.0.0-rc-2"
16
17
17
18
kotlin(" jvm" ) version kotlinVersion
18
19
id(" io.spring.dependency-management" ) version springDependencyManagementVersion
@@ -23,6 +24,7 @@ plugins {
23
24
id(" maven-publish" )
24
25
id(" signing" )
25
26
id(" net.researchgate.release" ) version gradleReleasePluginVersion
27
+ id(" io.github.gradle-nexus.publish-plugin" ) version gradleNexusPublishPluginVersion
26
28
}
27
29
28
30
group = " io.github.tobi-laa"
@@ -87,6 +89,17 @@ tasks.jacocoTestReport {
87
89
}
88
90
}
89
91
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
+
90
103
publishing {
91
104
publications {
92
105
create<MavenPublication >(" mavenJava" ) {
@@ -136,18 +149,6 @@ publishing {
136
149
}
137
150
}
138
151
}
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
- }
151
152
}
152
153
153
154
signing {
0 commit comments