Skip to content

Commit 0657ed6

Browse files
committed
Change doRelease 2
1 parent 4478676 commit 0657ed6

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

build.gradle

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,7 @@ nexusPublishing {
6969
}
7070

7171
release {
72-
buildTasks = [
73-
'checkLastVersionValue',
74-
'initializeSonatypeStagingRepository',
75-
'clean',
76-
'build',
77-
project.getTasksByName('publishToSonatype', true)
78-
]
72+
buildTasks = ['doRelease']
7973
git {
8074
requireBranch.set('xxx')
8175
}
@@ -107,8 +101,30 @@ def updateLastVersionValueTask = tasks.register('updateLastVersionValue') {
107101
}
108102
}
109103

104+
task doRelease {
105+
dependsOn(
106+
checkLastVersionValueTask,
107+
'initializeSonatypeStagingRepository',
108+
'clean',
109+
'build'
110+
)
111+
}
112+
110113
model {
111114
tasks.unSnapshotVersion {
112115
dependsOn updateLastVersionValueTask
113116
}
114117
}
118+
println('ooo1')
119+
println(project.getTasksByName('publishToSonatype', true))
120+
println('ooo1')
121+
afterEvaluate {
122+
println('ooo2')
123+
println(project.getTasksByName('publishToSonatype', true))
124+
println('ooo2')
125+
model {
126+
tasks.doRelease {
127+
dependsOn project.getTasksByName('publishToSonatype', true)
128+
}
129+
}
130+
}

0 commit comments

Comments
 (0)