From 668b44d3b54962a9a6d245d286333e0c82977e63 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Tue, 30 Sep 2025 21:56:16 -0500 Subject: [PATCH] chore(fdroid): Configure F-Droid build variant (#3265) --- app/build.gradle.kts | 19 +++++++++++++++++++ gradle.properties | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 890ea104b..dcdcd50d2 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -152,6 +152,10 @@ android { } else { signingConfig = signingConfigs.getByName("debug") } + productFlavors.getByName("fdroid") { + isMinifyEnabled = false + isShrinkResources = false + } } } bundle { language { enableSplit = false } } @@ -220,6 +224,21 @@ 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 { diff --git a/gradle.properties b/gradle.properties index 59a14bff1..92bc26c59 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,7 +25,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Ensure important default jvmargs aren't overwritten. See https://github.com/gradle/gradle/issues/19750 -org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=1g -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=2g -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit