summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/build.gradle15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 52ea901b..3eb948bb 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -3,6 +3,7 @@ import java.util.regex.Matcher
import java.util.regex.Pattern
apply plugin: 'com.android.application'
+def appName = ''
android {
compileSdkVersion 27
@@ -57,9 +58,10 @@ android {
custom {
dimension "mode"
//Change the package name as needed
- applicationId "org.sample.custom"
+ applicationId "org.sample.customs"
//Set app name here
- resValue "string", "app_name", "Bitmask Custom"
+ appName = "Custom"
+ resValue "string", "app_name", appName
//Change the versionCode as needed
versionCode 1
//Change the versionName as needed
@@ -381,3 +383,12 @@ task checkApplicationIdForCustomFlavor (type: Exec ) {
}
}
}
+
+task checkAppNameForCustomFlavor (type: Exec ) {
+ def currFlavor = getCurrentFlavorForBetaOrRelease()
+ if(currFlavor.contains("custom")) {
+ if (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