Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask_android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Danny de Caluwe
bitmask_android
Commits
308ae33a
Commit
308ae33a
authored
6 years ago
by
Janak Amarasena
Browse files
Options
Downloads
Patches
Plain Diff
Added custom app name validation
parent
b28c9a88
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/build.gradle
+13
-2
13 additions, 2 deletions
app/build.gradle
with
13 additions
and
2 deletions
app/build.gradle
+
13
−
2
View file @
308ae33a
...
...
@@ -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.custom
s
"
//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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment