File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -151,11 +151,6 @@ allprojects {
151
151
var logString: String? = null
152
152
153
153
tasks.register(" createGithubRelease" ) {
154
- check(workingTreeClean) { " Commit all changes before creating release" }
155
- check(allCommitsPushed) { " Push to remote before creating release" }
156
-
157
- dependsOn(" assembleRelease" )
158
-
159
154
val properties = Properties ()
160
155
val file = rootProject.file(" local.properties" )
161
156
if (file.exists()) {
@@ -168,7 +163,14 @@ allprojects {
168
163
check(repo != null && repo is String ) { " github_repo not provided in local.properties" }
169
164
check(token != null && token is String ) { " github_api_key not provided in local.properties" }
170
165
166
+ if (workingTreeClean && allCommitsPushed) {
167
+ dependsOn(" assembleRelease" )
168
+ }
169
+
171
170
doFirst {
171
+ check(workingTreeClean) { " Commit all changes before creating release" }
172
+ check(allCommitsPushed) { " Push to remote before creating release" }
173
+
172
174
val packageRelease = project.tasks.getByName<DefaultTask >(" packageRelease" )
173
175
174
176
val outputs = packageRelease.outputs.files
You can’t perform that action at this time.
0 commit comments