Commit 723097fc authored by Mygod's avatar Mygod

Fix release build failing

parent 37ff7fdd
...@@ -5,10 +5,10 @@ apply plugin: 'com.android.application' ...@@ -5,10 +5,10 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
def getCurrentFlavor() { def getCurrentFlavor() {
Matcher matcher = Pattern.compile("(assemble|generate)(\\w+)(Release|Debug)") String task = getGradle().getStartParameter().getTaskRequests().toString()
.matcher(getGradle().getStartParameter().getTaskRequests().toString()) Matcher matcher = Pattern.compile("(assemble|generate)\\w*(Release|Debug)").matcher(task)
if (matcher.find()) return matcher.group(1).toLowerCase() else { if (matcher.find()) return matcher.group(1).toLowerCase() else {
println "NO MATCH FOUND" println "Warning: No match found for $task"
return "debug" return "debug"
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment