Meshtastic-Android/settings.gradle.kts
James Rich 536b1eba1c feat(map): replace Google Maps + OSMDroid with unified Mapbox SDK in feature:map/androidMain
Replace the dual flavor-specific map implementations (Google Maps in app/src/google,
OSMDroid in app/src/fdroid) with a single Mapbox Maps Compose SDK (v11.21.1)
implementation living in feature:map/androidMain.

- Add Mapbox Maven repo with MAPBOX_DOWNLOADS_TOKEN auth to settings.gradle.kts
- Add mapbox-maps-android, mapbox-maps-compose deps to feature/map/build.gradle.kts
- Remove Google Maps, osmdroid, osmbonuspack deps from app/build.gradle.kts and catalog
- Create unified MapScreen, MapViewModel, MapboxMapContent, GeoJsonConverters,
  EditWaypointDialog, InlineMap, NodeTrackMap, NodeMapScreen, TracerouteMap
- Wire all Local*Provider CompositionLocals in MainActivity to new implementations
- Delete ~8200 lines of flavor-specific map code across google/fdroid source sets
- Delete dead MapViewProvider interface from core:ui
- Keep LocalMapMainScreenProvider for KMP/Desktop compatibility boundary
- Fix FlavorModule.kt, KoinVerificationTest.kt for deleted modules
- Pass spotlessCheck + detekt with zero violations
2026-04-14 16:24:29 -05:00

116 lines
3.4 KiB
Kotlin

/*
* Copyright (c) 2025 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
include(
":app",
":core:api",
":core:barcode",
":core:ble",
":core:common",
":core:data",
":core:database",
":core:datastore",
":core:di",
":core:domain",
":core:model",
":core:navigation",
":core:network",
":core:nfc",
":core:prefs",
":core:proto",
":core:repository",
":core:service",
":core:resources",
":core:takserver",
":core:testing",
":core:ui",
":feature:intro",
":feature:messaging",
":feature:connections",
":feature:map",
":feature:node",
":feature:settings",
":feature:firmware",
":feature:wifi-provision",
":feature:widget",
":mesh_service_example",
":desktop",
)
rootProject.name = "MeshtasticAndroid"
// https://docs.gradle.org/current/userguide/declaring_dependencies.html#sec:type-safe-project-accessors
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
pluginManagement {
includeBuild("build-logic")
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven { url = uri("https://jitpack.io") }
}
}
@Suppress("UnstableApiUsage")
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
// Only enable mavenLocal for local JitPack testing; never in CI.
if (providers.gradleProperty("useMavenLocal").isPresent) mavenLocal()
google()
mavenCentral()
maven {
url = uri("https://jitpack.io")
content {
includeGroupByRegex("com\\.github\\..*")
}
}
// Mapbox Maven repository — requires a Mapbox secret token with DOWNLOADS:READ scope.
// Set MAPBOX_DOWNLOADS_TOKEN in ~/.gradle/gradle.properties or as an env var.
maven {
url = uri("https://api.mapbox.com/downloads/v2/releases/maven")
authentication { create<BasicAuthentication>("basic") }
credentials {
username = "mapbox"
password = providers.gradleProperty("MAPBOX_DOWNLOADS_TOKEN")
.orElse(providers.environmentVariable("MAPBOX_DOWNLOADS_TOKEN"))
.orElse("")
.get()
}
}
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver") version "1.0.0"
id("com.gradle.develocity") version("4.4.0")
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.6.0"
}
// Shared Develocity and Build Cache configuration
apply(from = "gradle/develocity.settings.gradle")
@Suppress("UnstableApiUsage")
toolchainManagement {
jvm {
javaRepositories {
repository("foojay") {
resolverClass.set(org.gradle.toolchains.foojay.FoojayToolchainResolver::class.java)
}
}
}
}