mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Move res values from build.gradle into strings.xml
This fixes an issue where the build type values were overriding the flavor values.
This commit is contained in:
@@ -264,8 +264,6 @@ android {
|
|||||||
versionCode 10013
|
versionCode 10013
|
||||||
versionName "1.0.13"
|
versionName "1.0.13"
|
||||||
applicationId "org.briarproject.briar.android"
|
applicationId "org.briarproject.briar.android"
|
||||||
resValue "string", "app_package", "org.briarproject.briar.android"
|
|
||||||
resValue "string", "app_name", "Briar"
|
|
||||||
buildConfigField "String", "GitHash",
|
buildConfigField "String", "GitHash",
|
||||||
"\"${getStdout(['git', 'rev-parse', '--short=7', 'HEAD'], 'No commit hash')}\""
|
"\"${getStdout(['git', 'rev-parse', '--short=7', 'HEAD'], 'No commit hash')}\""
|
||||||
def now = (long) (System.currentTimeMillis() / 1000)
|
def now = (long) (System.currentTimeMillis() / 1000)
|
||||||
@@ -274,29 +272,9 @@ android {
|
|||||||
testInstrumentationRunner 'org.briarproject.briar.android.test.BriarTestRunner'
|
testInstrumentationRunner 'org.briarproject.briar.android.test.BriarTestRunner'
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions "version"
|
|
||||||
productFlavors {
|
|
||||||
screenshot {
|
|
||||||
dimension "version"
|
|
||||||
minSdkVersion 18
|
|
||||||
applicationIdSuffix ".screenshot"
|
|
||||||
resValue "string", "app_package", "org.briarproject.briar.android.screenshot.debug"
|
|
||||||
}
|
|
||||||
main {
|
|
||||||
dimension "version"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
variantFilter { variant ->
|
|
||||||
if (variant.flavors*.name.contains("screenshot") && variant.buildType.name == "release") {
|
|
||||||
setIgnore(true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
applicationIdSuffix ".debug"
|
applicationIdSuffix ".debug"
|
||||||
resValue "string", "app_package", "org.briarproject.briar.android.debug"
|
|
||||||
resValue "string", "app_name", "Briar Debug"
|
|
||||||
shrinkResources false
|
shrinkResources false
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
crunchPngs false
|
crunchPngs false
|
||||||
@@ -311,6 +289,23 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flavorDimensions "version"
|
||||||
|
productFlavors {
|
||||||
|
screenshot {
|
||||||
|
dimension "version"
|
||||||
|
minSdkVersion 18
|
||||||
|
applicationIdSuffix ".screenshot" // = org.briarproject.briar.android.screenshot.debug
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
dimension "version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
variantFilter { variant ->
|
||||||
|
if (variant.flavors*.name.contains("screenshot") && variant.buildType.name == "release") {
|
||||||
|
setIgnore(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
|||||||
5
briar-android/src/debug/res/values/strings.xml
Normal file
5
briar-android/src/debug/res/values/strings.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="app_name" translatable="false">Briar Debug</string>
|
||||||
|
<string name="app_package" translatable="false">org.briarproject.briar.android.debug</string>
|
||||||
|
</resources>
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
|
<string name="app_name" translatable="false">Briar</string>
|
||||||
|
<string name="app_package" translatable="false">org.briarproject.briar.android</string>
|
||||||
|
|
||||||
<!-- Setup -->
|
<!-- Setup -->
|
||||||
<string name="setup_title">Welcome to Briar</string>
|
<string name="setup_title">Welcome to Briar</string>
|
||||||
<string name="setup_name_explanation">Your nickname will be shown next to any content you post. You can\'t change it after creating your account.</string>
|
<string name="setup_name_explanation">Your nickname will be shown next to any content you post. You can\'t change it after creating your account.</string>
|
||||||
|
|||||||
5
briar-android/src/screenshotDebug/res/values/strings.xml
Normal file
5
briar-android/src/screenshotDebug/res/values/strings.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="app_name" translatable="false">Briar</string>
|
||||||
|
<string name="app_package" translatable="false">org.briarproject.briar.android.screenshot.debug</string>
|
||||||
|
</resources>
|
||||||
Reference in New Issue
Block a user