From a7eb17317837868f4ac8962dd48459c608ee3653 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Sat, 23 Jan 2021 20:05:07 +0000 Subject: [PATCH] app: enable split apk builds Currently we build a single APK which handles the four supported ABIs. Therefore each user, downloads 50-75% more than they need - adding towards both client/server-side network as well as device storage. Use a split APK approach - it costs nothing from build and server-side storage POV. Note: We're removing ndk:abiFilters - they're incompatible/superseded by the splits:abi:include list. Signed-off-by: Emil Velikov --- app/build.gradle | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 591d83ea2b..7d90f98cdd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,9 +25,14 @@ android { cFlags "-std=c11", "-Wall", "-Wextra", "-Werror", "-Os", "-fno-stack-protector", "-Wl,--gc-sections" } } + } + + splits { + abi { + enable true - ndk { - abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' + reset () + include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' } }