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 {
6969}
7070
7171release {
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+
110113model {
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+ }
You can’t perform that action at this time.
0 commit comments