Change app id based on current git branch
This enables to install multiple builds from different branches at once
This commit is contained in:
parent
9d1107b774
commit
165b552162
3 changed files with 10 additions and 19 deletions
|
|
@ -9,6 +9,7 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
applicationId "org.schabi.newpipe"
|
||||
resValue "string", "app_name", "NewPipe"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 28
|
||||
versionCode 840
|
||||
|
|
@ -28,7 +29,15 @@ android {
|
|||
debug {
|
||||
multiDexEnabled true
|
||||
debuggable true
|
||||
applicationIdSuffix ".debug"
|
||||
|
||||
def workingBranch = "git rev-parse --abbrev-ref HEAD".execute().text.trim()
|
||||
if (workingBranch.isEmpty() || workingBranch == "master" || workingBranch == "dev") {
|
||||
applicationIdSuffix ".debug"
|
||||
resValue "string", "app_name", "NewPipe Debug"
|
||||
} else {
|
||||
applicationIdSuffix ".debug." + workingBranch.replaceAll("[^A-Za-z]+", "")
|
||||
resValue "string", "app_name", "NewPipe " + workingBranch
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue