mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
954eb731e7
Remove dependencies flagged as unused by the Dependency Analysis Gradle Plugin (`./gradlew buildHealth`) and explicitly declared in module build files. Removals were skipped when the dependency provides transitively something the module (or a consumer of an `api` dependency) uses directly, as well as for runtime-only dependencies (element-call-embedded, sentry-android, rustls-platform-verifier). Dependencies added by the convention plugin helpers (composeDependencies, testCommonDependencies) are left untouched. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
77 lines
2.4 KiB
Kotlin
77 lines
2.4 KiB
Kotlin
/*
|
|
* Copyright (c) 2025 Element Creations Ltd.
|
|
* Copyright 2022-2025 New Vector Ltd.
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
|
* Please see LICENSE files in the repository root for full details.
|
|
*/
|
|
|
|
import config.BuildTimeConfig
|
|
import extension.buildConfigFieldStr
|
|
import extension.readLocalProperty
|
|
import extension.testCommonDependencies
|
|
|
|
plugins {
|
|
id("io.element.android-compose-library")
|
|
id("kotlin-parcelize")
|
|
}
|
|
|
|
android {
|
|
namespace = "io.element.android.features.location.api"
|
|
|
|
buildFeatures {
|
|
buildConfig = true
|
|
}
|
|
|
|
defaultConfig {
|
|
buildConfigFieldStr(
|
|
name = "MAPTILER_BASE_URL",
|
|
value = BuildTimeConfig.SERVICES_MAPTILER_BASE_URL ?: "https://api.maptiler.com/maps"
|
|
)
|
|
buildConfigFieldStr(
|
|
name = "MAPTILER_API_KEY",
|
|
value = if (isEnterpriseBuild) {
|
|
BuildTimeConfig.SERVICES_MAPTILER_APIKEY
|
|
} else {
|
|
System.getenv("ELEMENT_ANDROID_MAPTILER_API_KEY")
|
|
?: readLocalProperty("services.maptiler.apikey")
|
|
}
|
|
?: ""
|
|
)
|
|
buildConfigFieldStr(
|
|
name = "MAPTILER_LIGHT_MAP_ID",
|
|
value = if (isEnterpriseBuild) {
|
|
BuildTimeConfig.SERVICES_MAPTILER_LIGHT_MAPID
|
|
} else {
|
|
System.getenv("ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID")
|
|
?: readLocalProperty("services.maptiler.lightMapId")
|
|
}
|
|
// fall back to maptiler's default light map.
|
|
?: "basic-v2"
|
|
)
|
|
buildConfigFieldStr(
|
|
name = "MAPTILER_DARK_MAP_ID",
|
|
value = if (isEnterpriseBuild) {
|
|
BuildTimeConfig.SERVICES_MAPTILER_DARK_MAPID
|
|
} else {
|
|
System.getenv("ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID")
|
|
?: readLocalProperty("services.maptiler.darkMapId")
|
|
}
|
|
// fall back to maptiler's default dark map.
|
|
?: "basic-v2-dark"
|
|
)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(projects.libraries.architecture)
|
|
implementation(projects.libraries.designsystem)
|
|
implementation(projects.libraries.core)
|
|
implementation(projects.libraries.matrix.api)
|
|
implementation(projects.libraries.uiStrings)
|
|
implementation(projects.features.enterprise.api)
|
|
implementation(libs.coil.compose)
|
|
|
|
testCommonDependencies(libs)
|
|
}
|