File tree Expand file tree Collapse file tree 2 files changed +22
-11
lines changed Expand file tree Collapse file tree 2 files changed +22
-11
lines changed Original file line number Diff line number Diff line change @@ -110,15 +110,15 @@ jobs:
110
110
- shell : bash
111
111
env :
112
112
DEVELOCITY_ACCESS_KEY : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
113
- ORG_GRADLE_PROJECT_sonatypeUsername : ${{ secrets.SONATYPE_USERNAME }}
114
- ORG_GRADLE_PROJECT_sonatypePassword : ${{ secrets.SONATYPE_PASSWORD }}
113
+ ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
114
+ ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
115
115
run : |
116
116
./gradlew \
117
117
-Porg.gradle.java.installations.auto-download=false \
118
118
"-Dscan.value.GitHub job=${{ github.job }}" \
119
119
-Dscan.tag.publish \
120
120
--scan \
121
121
javaToolchains \
122
- publish \
122
+ publishAllPublicationsToMavenCentralSnapshotsRepository \
123
123
-x check \
124
124
--no-configuration-cache
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ plugins {
9
9
`maven- publish`
10
10
signing
11
11
id(" com.diffplug.spotless" ) version " 7.0.3"
12
- id(" io.github.gradle-nexus.publish-plugin " ) version " 2.0.0 "
12
+ id(" com.gradleup.nmcp " ) version " 0.1.4 "
13
13
}
14
14
15
15
val javaToolchainVersion = providers.gradleProperty(" javaToolchainVersion" )
@@ -240,13 +240,6 @@ spotless {
240
240
lineEndings = LineEnding .PLATFORM_NATIVE
241
241
}
242
242
243
- nexusPublishing {
244
- packageGroup.set(" org.junit" )
245
- repositories {
246
- sonatype()
247
- }
248
- }
249
-
250
243
publishing {
251
244
publications {
252
245
create<MavenPublication >(" maven" ) {
@@ -280,6 +273,24 @@ publishing {
280
273
}
281
274
}
282
275
}
276
+ repositories {
277
+ maven {
278
+ name = " mavenCentralSnapshots"
279
+ url = uri(" https://central.sonatype.com/repository/maven-snapshots/" )
280
+ credentials {
281
+ username = providers.gradleProperty(" mavenCentralUsername" ).orNull
282
+ password = providers.gradleProperty(" mavenCentralPassword" ).orNull
283
+ }
284
+ }
285
+ }
286
+ }
287
+
288
+ nmcp {
289
+ centralPortal {
290
+ username = providers.gradleProperty(" mavenCentralUsername" )
291
+ password = providers.gradleProperty(" mavenCentralPassword" )
292
+ publishingType = providers.gradleProperty(" mavenCentralPublishingType" ).orElse(" USER_MANAGED" )
293
+ }
283
294
}
284
295
285
296
signing {
You can’t perform that action at this time.
0 commit comments