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
da4b27f606
commit
a3bce7f7ca
|
@ -9,6 +9,7 @@ android {
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "org.schabi.newpipe"
|
applicationId "org.schabi.newpipe"
|
||||||
|
resValue "string", "app_name", "NewPipe"
|
||||||
minSdkVersion 19
|
minSdkVersion 19
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 840
|
versionCode 840
|
||||||
|
@ -28,7 +29,15 @@ android {
|
||||||
debug {
|
debug {
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
debuggable 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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
package="org.schabi.newpipe">
|
|
||||||
|
|
||||||
<application
|
|
||||||
android:name=".DebugApp"
|
|
||||||
android:label="NewPipe Debug"
|
|
||||||
tools:replace="android:name, android:label">
|
|
||||||
<activity
|
|
||||||
android:name=".MainActivity"
|
|
||||||
android:label="NewPipe Debug"
|
|
||||||
tools:replace="android:label"/>
|
|
||||||
</application>
|
|
||||||
|
|
||||||
</manifest>
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name" translatable="false">NewPipe</string>
|
|
||||||
<string name="main_bg_subtitle">Tap \"Search\" to get started</string>
|
<string name="main_bg_subtitle">Tap \"Search\" to get started</string>
|
||||||
<string name="view_count_text">%1$s views</string>
|
<string name="view_count_text">%1$s views</string>
|
||||||
<string name="upload_date_text">Published on %1$s</string>
|
<string name="upload_date_text">Published on %1$s</string>
|
||||||
|
|
Loading…
Reference in New Issue