Skip to content

Commit 792b1f5

Browse files
committed
Merge remote-tracking branch 'origin/main' into 6.x
2 parents 624cdd5 + 0c46de5 commit 792b1f5

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

build.gradle

+15-14
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ plugins {
44
id 'com.diffplug.spotless' version '6.25.0'
55
id 'signing'
66
id 'maven-publish'
7-
id 'net.researchgate.release' version '3.0.2'
87
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
8+
id 'net.researchgate.release' version '3.0.2'
99
}
1010

1111
wrapper {
@@ -67,8 +67,8 @@ nexusPublishing {
6767
repositories {
6868
sonatype {
6969
nexusUrl.set(uri("https://oss.sonatype.org/service/local/"))
70-
username = project.findProperty('sonatypeUser') ?: ''
71-
password = project.findProperty('sonatypePassword') ?: ''
70+
username = project.findProperty('ossSonatypeUsername') ?: ''
71+
password = project.findProperty('ossSonatypePassword') ?: ''
7272
}
7373
}
7474
}
@@ -115,22 +115,13 @@ publishing {
115115
}
116116

117117
release {
118-
buildTasks = ['releaseBuild']
118+
buildTasks = ['doRelease']
119119
git {
120120
requireBranch.set('6.x')
121121
}
122122
}
123123

124-
task releaseBuild {
125-
dependsOn(
126-
'checkLastVersionValue',
127-
'clean',
128-
'build',
129-
project.getTasksByName('publishToSonatype', true)
130-
)
131-
}
132-
133-
tasks.register('checkLastVersionValue') {
124+
def checkLastVersionValueTask = tasks.register('checkLastVersionValue') {
134125
doLast {
135126
if(version.endsWith('SNAPSHOT')) {
136127
throw new GradleException("version '$version' ends with SNAPSHOT, this is not a release build!")
@@ -151,6 +142,16 @@ def updateLastVersionValueTask = tasks.register('updateLastVersionValue') {
151142
}
152143
}
153144

145+
tasks.register('doRelease') {
146+
dependsOn(
147+
checkLastVersionValueTask,
148+
'initializeSonatypeStagingRepository',
149+
'clean',
150+
'build',
151+
project.getTasksByName('publishToSonatype', true)
152+
)
153+
}
154+
154155
model {
155156
tasks.unSnapshotVersion {
156157
dependsOn updateLastVersionValueTask

0 commit comments

Comments
 (0)