diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 543a414091..05f7bdf139 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -69,7 +69,7 @@ android { } signingConfigs { - named("debug") { + getByName("debug") { keyAlias = "androiddebugkey" keyPassword = "android" storeFile = file("./signature/debug.keystore") @@ -87,13 +87,13 @@ android { } buildTypes { - named("debug") { + getByName("debug") { resValue("string", "app_name", "Element X dbg") applicationIdSuffix = ".debug" signingConfig = signingConfigs.getByName("debug") } - named("release") { + getByName("release") { resValue("string", "app_name", "Element X") signingConfig = signingConfigs.getByName("debug") @@ -143,6 +143,21 @@ android { buildFeatures { buildConfig = true } + flavorDimensions += "store" + productFlavors { + create("gplay") { + dimension = "store" + isDefault = true + buildConfigField("String", "SHORT_FLAVOR_DESCRIPTION", "\"G\"") + buildConfigField("String", "FLAVOR_DESCRIPTION", "\"GooglePlay\"") + + } + create("fdroid") { + dimension = "store" + buildConfigField("String", "SHORT_FLAVOR_DESCRIPTION", "\"F\"") + buildConfigField("String", "FLAVOR_DESCRIPTION", "\"FDroid\"") + } + } } androidComponents { diff --git a/app/src/main/kotlin/io/element/android/x/di/AppModule.kt b/app/src/main/kotlin/io/element/android/x/di/AppModule.kt index 995dcf61e5..bf4880b372 100644 --- a/app/src/main/kotlin/io/element/android/x/di/AppModule.kt +++ b/app/src/main/kotlin/io/element/android/x/di/AppModule.kt @@ -91,10 +91,8 @@ object AppModule { gitRevisionDate = "TODO", // BuildConfig.GIT_BRANCH_NAME, gitBranchName = "TODO", - // BuildConfig.FLAVOR_DESCRIPTION, - flavorDescription = "TODO", - // BuildConfig.SHORT_FLAVOR_DESCRIPTION, - flavorShortDescription = "TODO", + flavorDescription = BuildConfig.FLAVOR_DESCRIPTION, + flavorShortDescription = BuildConfig.SHORT_FLAVOR_DESCRIPTION, ) @Provides diff --git a/plugins/src/main/kotlin/extension/KoverExtension.kt b/plugins/src/main/kotlin/extension/KoverExtension.kt index 42b7a5bc1f..9185bfb1b0 100644 --- a/plugins/src/main/kotlin/extension/KoverExtension.kt +++ b/plugins/src/main/kotlin/extension/KoverExtension.kt @@ -97,8 +97,8 @@ fun Project.setupKover() { defaults { // add reports of both 'debug' and 'release' Android build variants to default reports - mergeWith("debug") - mergeWith("release") + mergeWith("gplayDebug") + mergeWith("gplayRelease") verify { onCheck = true @@ -202,7 +202,7 @@ fun Project.setupKover() { } } - androidReports("release") {} + androidReports("gplayRelease") {} } } diff --git a/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/Singleton.kt b/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/Singleton.kt index cc54fd051f..fc8fe81d8a 100644 --- a/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/Singleton.kt +++ b/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/Singleton.kt @@ -43,10 +43,8 @@ object Singleton { gitRevisionDate = "TODO", // BuildConfig.GIT_BRANCH_NAME, gitBranchName = "TODO", - // BuildConfig.FLAVOR_DESCRIPTION, - flavorDescription = "TODO", - // BuildConfig.SHORT_FLAVOR_DESCRIPTION, - flavorShortDescription = "TODO", + flavorDescription = "NA", + flavorShortDescription = "NA", ) init {