diff options
author | cyBerta <cyberta@riseup.net> | 2019-07-14 10:40:53 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2019-07-14 10:40:53 +0200 |
commit | c780067357b711e98a76c42a41e30ef7d7d7d152 (patch) | |
tree | 02ab49b5b95d591a1ec3e6eafdc904578aa87997 | |
parent | afea1bfb32d4218af19b5368588b4c91a5ec7793 (diff) |
remove unnecessary check for unchanged default app names and application Id's in build.gradle
-rw-r--r-- | app/build.gradle | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/app/build.gradle b/app/build.gradle index b76c426f..34cbbd2e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,4 +1,3 @@ -import java.util.concurrent.ExecutionException import java.util.regex.Matcher import java.util.regex.Pattern @@ -426,42 +425,4 @@ def getCurrentFlavorForBetaOrRelease() { { return ""; } -} - -def getCurrentFlavor() { - Gradle gradle = getGradle() - String tskReqStr = gradle.getStartParameter().getTaskRequests().toString() - - Pattern pattern; - - if (tskReqStr.contains("assemble")) - pattern = Pattern.compile("assemble(\\w+)(Beta|Release|Debug)") - else - pattern = Pattern.compile("generate(\\w+)(Beta|Release|Debug)") - - Matcher matcher = pattern.matcher(tskReqStr) - - if (matcher.find()) - return matcher.group(1).toLowerCase() - else { - return ""; - } -} - -task checkApplicationIdForCustomFlavor(type: Exec) { - def currFlavor = getCurrentFlavor() - if (currFlavor.contains("custom")) { - android.applicationVariants.all { variant -> - def mergedFlavor = variant.mergedFlavor - if (variant.flavorName.toString().equalsIgnoreCase(currFlavor) && - mergedFlavor.getApplicationId().equalsIgnoreCase("org.sample.custom")) - throw new ExecutionException("ERROR: please change the applicationId(org.sample.custom) if you want to build a custom branded app!") - } - } -} - -task checkAppNameForCustomFlavor(type: Exec) { - def currFlavor = getCurrentFlavor() - if (currFlavor.contains("custom") && appName.equalsIgnoreCase("custom")) - throw new ExecutionException("ERROR: please change the appName(Custom) if you want to build a custom branded app!") }
\ No newline at end of file |