From b37b27eb353750eb888cd7fb87f8ac91e9c1d73b Mon Sep 17 00:00:00 2001 From: Taras Smakula <tarassmakula@gmail.com> Date: Thu, 25 Jan 2024 15:40:11 +0200 Subject: [PATCH] Add ABI_FILTERS property for fdroid --- app/build.gradle | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 606316aca..ba28552a4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,6 +5,8 @@ apply plugin: 'androidx.navigation.safeargs.kotlin' apply plugin: 'kotlin-kapt' apply plugin: 'dagger.hilt.android.plugin' +def splitApks = !project.hasProperty("noSplits") + android { compileSdk rootProject.ext.sdk_version @@ -17,14 +19,24 @@ android { archivesBaseName = "circles-v${versionName}" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + if (project.hasProperty("noSplits")) { + ndk { + (project.properties["ABI_FILTERS"] as String).split(';').each { + abiFilters.add(it) + } + } + } } - splits { - abi { - enable true - reset() - include "x86", "x86_64", "arm64-v8a", "armeabi-v7a" - universalApk false + if (splitApks) { + splits { + abi { + enable true + reset() + include "x86", "x86_64", "arm64-v8a", "armeabi-v7a" + universalApk false + } } } -- GitLab