File tree Expand file tree Collapse file tree 1 file changed +23
-7
lines changed Expand file tree Collapse file tree 1 file changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -69,13 +69,7 @@ nexusPublishing {
69
69
}
70
70
71
71
release {
72
- buildTasks = [
73
- ' checkLastVersionValue' ,
74
- ' initializeSonatypeStagingRepository' ,
75
- ' clean' ,
76
- ' build' ,
77
- project. getTasksByName(' publishToSonatype' , true )
78
- ]
72
+ buildTasks = [' doRelease' ]
79
73
git {
80
74
requireBranch. set(' xxx' )
81
75
}
@@ -107,8 +101,30 @@ def updateLastVersionValueTask = tasks.register('updateLastVersionValue') {
107
101
}
108
102
}
109
103
104
+ task doRelease {
105
+ dependsOn(
106
+ checkLastVersionValueTask,
107
+ ' initializeSonatypeStagingRepository' ,
108
+ ' clean' ,
109
+ ' build'
110
+ )
111
+ }
112
+
110
113
model {
111
114
tasks. unSnapshotVersion {
112
115
dependsOn updateLastVersionValueTask
113
116
}
114
117
}
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
+ }
You can’t perform that action at this time.
0 commit comments