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 {
151151 var logString: String? = null
152152
153153 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-
159154 val properties = Properties ()
160155 val file = rootProject.file(" local.properties" )
161156 if (file.exists()) {
@@ -168,7 +163,14 @@ allprojects {
168163 check(repo != null && repo is String ) { " github_repo not provided in local.properties" }
169164 check(token != null && token is String ) { " github_api_key not provided in local.properties" }
170165
166+ if (workingTreeClean && allCommitsPushed) {
167+ dependsOn(" assembleRelease" )
168+ }
169+
171170 doFirst {
171+ check(workingTreeClean) { " Commit all changes before creating release" }
172+ check(allCommitsPushed) { " Push to remote before creating release" }
173+
172174 val packageRelease = project.tasks.getByName<DefaultTask >(" packageRelease" )
173175
174176 val outputs = packageRelease.outputs.files
You can’t perform that action at this time.
0 commit comments