File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 java-version : ' 17'
2020
2121 - name : Publish Maven Libraries
22- run : ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
22+ run : ./gradlew modulefs: publishToSonatype closeAndReleaseSonatypeStagingRepository
2323 env :
2424 GPG_KEY_ID : ${{ secrets.GPG_KEY_ID }}
2525 GPG_KEY : ${{ secrets.GPG_KEY }}
Original file line number Diff line number Diff line change 11plugins {
22 id(" io.github.gradle-nexus.publish-plugin" ) version " 2.0.0"
3+ }
4+
5+ def user = project. hasProperty(' sonatypeUsername' ) ? project. property(' sonatypeUsername' ) : System . getenv(' SONATYPE_USERNAME' )
6+ def pass = project. hasProperty(' sonatypePassword' ) ? project. property(' sonatypePassword' ) : System . getenv(' SONATYPE_PASSWORD' )
7+
8+ tasks. withType(GenerateModuleMetadata ). configureEach {
9+ enabled = false
10+ }
11+
12+ nexusPublishing {
13+ repositories {
14+ sonatype {
15+ nexusUrl. set(uri(" https://ossrh-staging-api.central.sonatype.com/service/local/" ))
16+ snapshotRepositoryUrl. set(uri(' https://central.sonatype.com/repository/maven-snapshots/' ))
17+ username = user
18+ password = pass
19+ }
20+ }
21+ useStaging = true
322}
Original file line number Diff line number Diff line change @@ -44,22 +44,3 @@ signing {
4444
4545 sign publishing. publications. mavenJava
4646}
47-
48- tasks. withType(GenerateModuleMetadata ). configureEach {
49- enabled = false
50- }
51-
52- def user = project. hasProperty(' sonatypeUsername' ) ? project. property(' sonatypeUsername' ) : System . getenv(' SONATYPE_USERNAME' )
53- def pass = project. hasProperty(' sonatypePassword' ) ? project. property(' sonatypePassword' ) : System . getenv(' SONATYPE_PASSWORD' )
54-
55- nexusPublishing {
56- repositories {
57- sonatype {
58- nexusUrl. set(uri(" https://ossrh-staging-api.central.sonatype.com/service/local/" ))
59- snapshotRepositoryUrl. set(uri(' https://central.sonatype.com/repository/maven-snapshots/' ))
60- username = user
61- password = pass
62- }
63- }
64- useStaging = true
65- }
You can’t perform that action at this time.
0 commit comments