mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2025-12-24 00:07:48 -05:00
refactor: consolidate F-Droid task disabling to convention plugin (#3990)
This commit is contained in:
@@ -259,17 +259,6 @@ dependencies {
|
||||
dokkaPlugin(libs.dokka.android.documentation.plugin)
|
||||
}
|
||||
|
||||
val googleServiceKeywords = listOf("crashlytics", "google", "datadog")
|
||||
|
||||
tasks.configureEach {
|
||||
if (
|
||||
googleServiceKeywords.any { name.contains(it, ignoreCase = true) } && name.contains("fdroid", ignoreCase = true)
|
||||
) {
|
||||
project.logger.lifecycle("Disabling task for F-Droid: $name")
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
dokka {
|
||||
moduleName.set("Meshtastic App")
|
||||
dokkaSourceSets.main {
|
||||
|
||||
@@ -56,6 +56,18 @@ class AnalyticsConventionPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Disable Analytics tasks for non-google flavors
|
||||
val analyticsKeywords = listOf("crashlytics", "google", "datadog")
|
||||
tasks.configureEach {
|
||||
val taskName = name.lowercase()
|
||||
val isAnalyticsTask = analyticsKeywords.any { taskName.contains(it) }
|
||||
|
||||
if (isAnalyticsTask && taskName.contains("fdroid")) {
|
||||
logger.lifecycle("AnalyticsConventionPlugin: Disabling task $name")
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,17 +43,6 @@ dependencies {
|
||||
googleApi(libs.firebase.crashlytics)
|
||||
}
|
||||
|
||||
val googleServiceKeywords = listOf("crashlytics", "google", "datadog")
|
||||
|
||||
tasks.configureEach {
|
||||
if (
|
||||
googleServiceKeywords.any { name.contains(it, ignoreCase = true) } && name.contains("fdroid", ignoreCase = true)
|
||||
) {
|
||||
project.logger.lifecycle("Disabling task for F-Droid: $name")
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
buildFeatures { buildConfig = true }
|
||||
namespace = "org.meshtastic.core.analytics"
|
||||
|
||||
Reference in New Issue
Block a user