@@ -130,27 +130,25 @@ if (isAndroidLib) {
130
130
if (isAndroid) {
131
131
val android = extensions.getByType<BaseExtension >()
132
132
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
-
142
133
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" )
145
138
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())
148
143
}
149
144
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
+
150
151
doFirst {
151
- check(workingTreeClean) { " Commit all changes before creating release" }
152
- check(allCommitsPushed) { " Push to remote before creating release" }
153
-
154
152
val packageRelease = project.tasks.getByName<DefaultTask >(" packageRelease" )
155
153
156
154
val outputs = packageRelease.outputs.files
0 commit comments