Skip to content

Commit 74ee146

Browse files
committed
chore: Replace plugin to release to Maven Central
1 parent 50c2249 commit 74ee146

File tree

5 files changed

+307
-208
lines changed

5 files changed

+307
-208
lines changed

build.gradle

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ plugins {
77
id "signing"
88
id "eclipse"
99
id "idea"
10+
id 'org.jreleaser' version '1.18.0'
1011
}
1112

1213
sourceCompatibility = 1.8
@@ -195,16 +196,7 @@ publishing {
195196

196197
repositories {
197198
maven {
198-
name = "sonatype"
199-
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
200-
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
201-
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
202-
if (project.hasProperty("ossrhUsername") && project.hasProperty("ossrhPassword")) {
203-
credentials {
204-
username = ossrhUsername
205-
password = ossrhPassword
206-
}
207-
}
199+
url = layout.buildDirectory.dir('staging-deploy')
208200
}
209201
}
210202
}
@@ -218,6 +210,27 @@ signing {
218210
sign publishing.publications.boxJavaSdk
219211
}
220212

213+
jreleaser {
214+
signing {
215+
active = "NEVER"
216+
}
217+
deploy {
218+
maven {
219+
mavenCentral {
220+
sonatype {
221+
sign = false
222+
active = 'RELEASE'
223+
url = 'https://central.sonatype.com/api/v1/publisher'
224+
stagingRepository('build/staging-deploy')
225+
username = centralUsername
226+
password = centralPassword
227+
}
228+
}
229+
230+
}
231+
}
232+
}
233+
221234
idea {
222235
module {
223236
sourceDirs -= file("src/intTest/java")

gradle/wrapper/gradle-wrapper.jar

-11 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#Tue Jan 11 17:10:51 CET 2022
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

0 commit comments

Comments
 (0)