File tree Expand file tree Collapse file tree 2 files changed +23
-23
lines changed
Expand file tree Collapse file tree 2 files changed +23
-23
lines changed Original file line number Diff line number Diff line change 11plugins {
22 id ' java-library'
33 id ' maven-publish'
4- id ' signing'
54 id ' com.google.protobuf' version ' 0.9.4'
65 id ' com.github.sherter.google-java-format' version ' 0.9'
7- id ' io.codearte.nexus-staging ' version ' 0.30 .0'
6+ id ' org.jreleaser ' version ' 1.20 .0'
87}
98
109repositories {
@@ -89,16 +88,6 @@ task sourcesJar(type: Jar) {
8988 from sourceSets. main. allJava
9089}
9190
92- if (project. hasProperty(' ossrhUsername' ) && project. hasProperty(' ossrhPassword' )) {
93- // Nexus staging plugin only works at root project level
94- // See https://github.com/Codearte/gradle-nexus-staging-plugin/issues/47
95- nexusStaging {
96- username = ossrhUsername
97- password = ossrhPassword
98- packageGroup = group
99- }
100- }
101-
10291publishing {
10392 publications {
10493 maven(MavenPublication ) {
@@ -143,21 +132,32 @@ publishing {
143132 }
144133 repositories {
145134 maven {
146- url ' https://google.oss.sonatype.org/service/local/staging/deploy/maven2/'
147- credentials {
148- username = project. hasProperty(' ossrhUsername' ) ? project. getProperty(' ossrhUsername' ) : null
149- password = project. hasProperty(' ossrhPassword' ) ? project. getProperty(' ossrhPassword' ) : null
150- }
135+ url = layout. buildDirectory. dir(' staging-deploy' )
151136 }
152137 }
153138}
154139
155- signing {
156- if (! project. hasProperty(' skip.signing' )) {
157- if (project. hasProperty(' signing.gnupg.executable' )) {
158- useGpgCmd()
140+ jreleaser {
141+ gitRootSearch = true
142+ signing {
143+ active = ' ALWAYS'
144+ armored = true
145+ }
146+ deploy {
147+ maven {
148+ mavenCentral {
149+ sonatype {
150+ active = ' ALWAYS'
151+ url = ' https://central.sonatype.com/api/v1/publisher'
152+ stagingRepository(' build/staging-deploy' )
153+ }
154+ }
155+ }
156+ }
157+ release {
158+ github {
159+ skipRelease = true
159160 }
160- sign publishing. publications. maven
161161 }
162162}
163163
Original file line number Diff line number Diff line change 11distributionBase =GRADLE_USER_HOME
22distributionPath =wrapper/dists
3- distributionUrl =https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-7.6.5 -bin.zip
44networkTimeout =10000
55zipStoreBase =GRADLE_USER_HOME
66zipStorePath =wrapper/dists
You can’t perform that action at this time.
0 commit comments