@@ -130,27 +130,25 @@ if (isAndroidLib) {
130130if (isAndroid) {
131131 val android = extensions.getByType<BaseExtension >()
132132
133- val properties = Properties ()
134- val file = rootProject.file(" local.properties" )
135- if (file.exists()) {
136- properties.load(file.inputStream())
137- }
138-
139- val repo = properties[" github_repo" ]
140- val token = properties[" github_api_key" ]
141-
142133 tasks.create(" createGithubRelease" ) {
143- check(repo != null && repo is String ) { " github_repo not provided in local.properties" }
144- check(token != null && token is String ) { " github_api_key not provided in local.properties" }
134+ check(workingTreeClean) { " Commit all changes before creating release" }
135+ check(allCommitsPushed) { " Push to remote before creating release" }
136+
137+ dependsOn(" assembleRelease" )
145138
146- if (workingTreeClean && allCommitsPushed) {
147- dependsOn(" assembleRelease" )
139+ val properties = Properties ()
140+ val file = rootProject.file(" local.properties" )
141+ if (file.exists()) {
142+ properties.load(file.inputStream())
148143 }
149144
145+ val repo = properties[" github_repo" ]
146+ val token = properties[" github_api_key" ]
147+
148+ check(repo != null && repo is String ) { " github_repo not provided in local.properties" }
149+ check(token != null && token is String ) { " github_api_key not provided in local.properties" }
150+
150151 doFirst {
151- check(workingTreeClean) { " Commit all changes before creating release" }
152- check(allCommitsPushed) { " Push to remote before creating release" }
153-
154152 val packageRelease = project.tasks.getByName<DefaultTask >(" packageRelease" )
155153
156154 val outputs = packageRelease.outputs.files
0 commit comments