Skip to content

Commit f12ceec

Browse files
authored
configure jReleaser
1 parent 079c0ab commit f12ceec

1 file changed

Lines changed: 34 additions & 7 deletions

File tree

build.gradle

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ plugins {
99
id 'net.nemerosa.versioning' version '3.1.0'
1010
id 'jacoco'
1111
id 'org.sonarqube' version '3.2.0'
12+
id 'org.jreleaser' version '1.22.0'
1213
}
1314

1415
group = 'io.github.joealisson'
@@ -133,21 +134,47 @@ publishing {
133134

134135
repositories {
135136
maven {
136-
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
137-
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
138-
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
139-
credentials {
140-
username ossrhUsername
141-
password ossrhPassword
142-
}
137+
url = layout.buildDirectory.dir('staging-deploy')
138+
}
139+
}
140+
}
141+
142+
jreleaser {
143+
signing {
144+
pgp {
145+
active = 'ALWAYS'
146+
armored = true
147+
}
148+
}
149+
deploy {
150+
maven {
151+
mavenCentral {
152+
sonatype {
153+
active = 'RELEASE'
154+
url = 'https://central.sonatype.com/api/v1/publisher'
155+
stagingRepository('target/staging-deploy')
143156
}
157+
}
144158
}
159+
}
160+
nexus2 {
161+
'snapshot-deploy' {
162+
active = 'SNAPSHOT'
163+
snapshotUrl = 'https://central.sonatype.com/repository/maven-snapshots/'
164+
applyMavenCentralRules = true
165+
snapshotSupported = true
166+
closeRepository = true
167+
releaseRepository = false
168+
stagingRepository('target/staging-deploy')
169+
}
170+
}
145171
}
146172

147173
signing {
148174
sign publishing.publications.maven
149175
}
150176

177+
151178
sonarqube {
152179
properties {
153180
property "sonar.projectKey", "JoeAlisson_async-mmocore2"

0 commit comments

Comments
 (0)