@ -20,6 +20,8 @@ import com.android.build.api.variant.FilterConfiguration.FilterType.ABI
@@ -20,6 +20,8 @@ import com.android.build.api.variant.FilterConfiguration.FilterType.ABI
import extension.allFeaturesImpl
import extension.allLibrariesImpl
import extension.allServicesImpl
import extension.koverDependencies
import extension.setupKover
import org.jetbrains.kotlin.cli.common.toBooleanLenient
plugins {
@ -36,6 +38,8 @@ plugins {
@@ -36,6 +38,8 @@ plugins {
// id("com.google.gms.google-services")
}
setupKover()
android {
namespace = "io.element.android.x"
@ -69,7 +73,7 @@ android {
@@ -69,7 +73,7 @@ android {
}
signingConfigs {
named ("debug") {
getByName ("debug") {
keyAlias = "androiddebugkey"
keyPassword = "android"
storeFile = file("./signature/debug.keystore")
@ -87,13 +91,13 @@ android {
@@ -87,13 +91,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")
@ -124,7 +128,7 @@ android {
@@ -124,7 +128,7 @@ android {
// We upload the universal APK to fix this error:
// "App Distribution found more than 1 output file for this variant.
// Please contact firebase-support@google.com for help using APK splits with App Distribution."
artifactPath = "$rootDir/app/build/outputs/apk/nightly/app-universal-nightly.apk"
artifactPath = "$rootDir/app/build/outputs/apk/gplay/ nightly/app-gplay -universal-nightly.apk"
// artifactType = "AAB"
// artifactPath = "$rootDir/app/build/outputs/bundle/nightly/app-nightly.aab"
// This file will be generated by the GitHub action
@ -143,6 +147,20 @@ android {
@@ -143,6 +147,20 @@ 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 {
@ -222,6 +240,11 @@ dependencies {
@@ -222,6 +240,11 @@ dependencies {
implementation(projects.appconfig)
anvil(projects.anvilcodegen)
// Comment to not include firebase in the project
"gplayImplementation"(projects.libraries.pushproviders.firebase)
// Comment to not include unified push in the project
implementation(projects.libraries.pushproviders.unifiedpush)
implementation(libs.appyx.core)
implementation(libs.androidx.splash)
implementation(libs.androidx.core)
@ -251,4 +274,5 @@ dependencies {
@@ -251,4 +274,5 @@ dependencies {
testImplementation(projects.libraries.matrix.test)
ksp(libs.showkase.processor)
koverDependencies()
}