mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Use ModulesConfig for push provider modules.
This commit is contained in:
@@ -250,10 +250,12 @@ dependencies {
|
|||||||
implementation(projects.libraries.uiStrings)
|
implementation(projects.libraries.uiStrings)
|
||||||
anvil(projects.anvilcodegen)
|
anvil(projects.anvilcodegen)
|
||||||
|
|
||||||
// Comment to not include firebase in the project
|
if (ModulesConfig.pushProvidersConfig.includeFirebase) {
|
||||||
"gplayImplementation"(projects.libraries.pushproviders.firebase)
|
"gplayImplementation"(projects.libraries.pushproviders.firebase)
|
||||||
// Comment to not include unified push in the project
|
}
|
||||||
implementation(projects.libraries.pushproviders.unifiedpush)
|
if (ModulesConfig.pushProvidersConfig.includeFirebase) {
|
||||||
|
implementation(projects.libraries.pushproviders.unifiedpush)
|
||||||
|
}
|
||||||
|
|
||||||
implementation(libs.appyx.core)
|
implementation(libs.appyx.core)
|
||||||
implementation(libs.androidx.splash)
|
implementation(libs.androidx.splash)
|
||||||
|
|||||||
@@ -6,10 +6,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import config.AnalyticsConfig
|
import config.AnalyticsConfig
|
||||||
|
import config.PushProvidersConfig
|
||||||
|
|
||||||
object ModulesConfig {
|
object ModulesConfig {
|
||||||
|
val pushProvidersConfig = PushProvidersConfig(
|
||||||
|
includeFirebase = true,
|
||||||
|
includeUnifiedPush = true,
|
||||||
|
)
|
||||||
|
|
||||||
val analyticsConfig: AnalyticsConfig = AnalyticsConfig.Enabled(
|
val analyticsConfig: AnalyticsConfig = AnalyticsConfig.Enabled(
|
||||||
withPosthog = true,
|
withPosthog = true,
|
||||||
withSentry = true
|
withSentry = true,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2024 New Vector Ltd.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
* Please see LICENSE in the repository root for full details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package config
|
||||||
|
|
||||||
|
data class PushProvidersConfig(
|
||||||
|
val includeFirebase: Boolean,
|
||||||
|
val includeUnifiedPush: Boolean,
|
||||||
|
) {
|
||||||
|
init {
|
||||||
|
require(includeFirebase || includeUnifiedPush) {
|
||||||
|
"At least one push provider must be included"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user