09ee38bb7a
* fix(telemetry): prevent Google Play Services spam notifications Check for Google Play Services availability before initializing Firebase to prevent system notifications when GPS is disabled or uninstalled. - Add GPS availability check using GoogleApiAvailability - Wrap Firebase initialization in try-catch for additional safety - Skip Firebase initialization gracefully when GPS unavailable - Add proper logging for debugging purposes - Add core.common dependency to telemetry module for logcat support Fixes #3135 * docs: add changelog entry for Google Play Services notification fix --------- Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
32 lines
724 B
Kotlin
32 lines
724 B
Kotlin
import mihon.gradle.Config
|
|
|
|
plugins {
|
|
alias(mihonx.plugins.android.library)
|
|
alias(mihonx.plugins.spotless)
|
|
}
|
|
|
|
android {
|
|
namespace = "mihon.telemetry"
|
|
|
|
sourceSets {
|
|
getByName("main") {
|
|
if (Config.includeTelemetry) {
|
|
kotlin.srcDirs("src/firebase/kotlin")
|
|
} else {
|
|
kotlin.srcDirs("src/noop/kotlin")
|
|
manifest.srcFile("src/noop/AndroidManifext.xml")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(projects.core.common)
|
|
|
|
if (Config.includeTelemetry) {
|
|
implementation(platform(libs.firebase.bom))
|
|
implementation(libs.firebase.analytics)
|
|
implementation(libs.firebase.crashlytics)
|
|
}
|
|
}
|