From ddaaa1aaeb34f8120e691c44a462bc16efdd4ea3 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 2 Aug 2022 18:06:43 +0100 Subject: [PATCH] avoid clashing buildconfig and moving placeholders to the modules which uses them --- vector-app/build.gradle | 6 ------ vector-app/src/gplay/AndroidManifest.xml | 3 +-- vector-app/src/main/AndroidManifest.xml | 2 +- .../main/java/im/vector/app/core/di/SingletonModule.kt | 2 +- vector/build.gradle | 9 +++++++++ 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/vector-app/build.gradle b/vector-app/build.gradle index 6f2a065e34..317d391419 100644 --- a/vector-app/build.gradle +++ b/vector-app/build.gradle @@ -234,8 +234,6 @@ android { buildTypes { debug { applicationIdSuffix ".debug" - resValue "string", "app_name", "Element dbg" - signingConfig signingConfigs.debug if (project.hasProperty("coverage")) { @@ -244,7 +242,6 @@ android { } release { - resValue "string", "app_name", "Element" postprocessing { removeUnusedCode true removeUnusedResources true @@ -261,9 +258,6 @@ android { applicationIdSuffix ".nightly" versionNameSuffix "-nightly" - // Just override the background color of the launcher icon for the nightly build. - resValue "color", "launcher_background", "#07007E" - // We need to copy paste this block, this is not done automatically by `initWith release` postprocessing { removeUnusedCode true diff --git a/vector-app/src/gplay/AndroidManifest.xml b/vector-app/src/gplay/AndroidManifest.xml index c0c0c4ef0f..0d2bfeed53 100755 --- a/vector-app/src/gplay/AndroidManifest.xml +++ b/vector-app/src/gplay/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/vector-app/src/main/AndroidManifest.xml b/vector-app/src/main/AndroidManifest.xml index 33d4692546..4f5f02f833 100644 --- a/vector-app/src/main/AndroidManifest.xml +++ b/vector-app/src/main/AndroidManifest.xml @@ -1,2 +1,2 @@ - + diff --git a/vector-app/src/main/java/im/vector/app/core/di/SingletonModule.kt b/vector-app/src/main/java/im/vector/app/core/di/SingletonModule.kt index 431afab6ef..be16d9706d 100644 --- a/vector-app/src/main/java/im/vector/app/core/di/SingletonModule.kt +++ b/vector-app/src/main/java/im/vector/app/core/di/SingletonModule.kt @@ -28,7 +28,7 @@ import dagger.Module import dagger.Provides import dagger.hilt.InstallIn import dagger.hilt.components.SingletonComponent -import im.vector.app.BuildConfig +import im.vector.application.BuildConfig import im.vector.app.EmojiCompatWrapper import im.vector.app.EmojiSpanify import im.vector.app.SpaceStateHandler diff --git a/vector/build.gradle b/vector/build.gradle index f773571df1..ce513fd6ec 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -13,6 +13,11 @@ kapt { correctErrorTypes = true } +static def gitRevision() { + def cmd = "git rev-parse --short=8 HEAD" + return cmd.execute().text.trim() +} + project.android.buildTypes.all { buildType -> buildType.javaCompileOptions.annotationProcessorOptions.arguments = [ @@ -39,6 +44,8 @@ android { abiFilters "armeabi-v7a", "x86", 'arm64-v8a', 'x86_64' } + // Generate a random app task affinity + manifestPlaceholders = [appTaskAffinitySuffix: "H_${gitRevision()}"] // The following argument makes the Android Test Orchestrator run its // "pm clear" command after each test invocation. This command ensures @@ -64,6 +71,8 @@ android { } nightly { initWith release + // Just override the background color of the launcher icon for the nightly build. + resValue "color", "launcher_background", "#07007E" } release { resValue "string", "app_name", "Element"