Fix release build failing

This commit is contained in:
Mygod
2017-12-19 13:28:50 -08:00
parent 37ff7fddee
commit 723097fc8c
+3 -3
View File
@@ -5,10 +5,10 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
def getCurrentFlavor() {
Matcher matcher = Pattern.compile("(assemble|generate)(\\w+)(Release|Debug)")
.matcher(getGradle().getStartParameter().getTaskRequests().toString())
String task = getGradle().getStartParameter().getTaskRequests().toString()
Matcher matcher = Pattern.compile("(assemble|generate)\\w*(Release|Debug)").matcher(task)
if (matcher.find()) return matcher.group(1).toLowerCase() else {
println "NO MATCH FOUND"
println "Warning: No match found for $task"
return "debug"
}
}