From 8c6784864b1f9937fe9e9418c3fef7c7cdd35a88 Mon Sep 17 00:00:00 2001 From: jacquarg Date: Wed, 5 Mar 2025 10:53:05 +0100 Subject: [PATCH] chore:3046: Splits apk per abi, instead for separate libs. --- .gitlab-ci.yml | 5 ++-- app/build.gradle | 28 ++++++------------- .../features/location/FakeLocationMapView.kt | 4 +++ 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 058a6918..90cfd3db 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -74,7 +74,7 @@ build-release-test: build-e-release: stage: build script: - - ./gradlew :app:assembleEosRelease :app:assembleEosReleaseNoLibs + - ./gradlew :app:assembleEosRelease rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" when: never @@ -89,6 +89,5 @@ build-e-release: artifacts: paths: - - app/build/outputs/apk/eos/releaseNoLibs - - app/build/intermediates/merged_native_libs/eosRelease/mergeEosReleaseNativeLibs/out/lib + - app/build/outputs/apk/eos/release - app/build/reports diff --git a/app/build.gradle b/app/build.gradle index a00bce24..8c1c0b84 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -96,6 +96,15 @@ android { } } + splits { + abi { + enable true + reset() + include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' + universalApk false + } + } + buildTypes { debug { signingConfig null // Set signing config to null as we use signingConfig per variant. @@ -109,25 +118,6 @@ android { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } - releaseNoLibs { - matchingFallbacks = ["release"] - manifestPlaceholders = [ - persistent: "true", - mainActivityIntentFilterCategory: "android.intent.category.INFO" - ] - - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - /** - * Sets the output name of the variant outputs and also it setup signingConfig based on the product flavor. - */ - applicationVariants.all { variant -> - variant.outputs.all { output -> - outputFileName = "Advanced_Privacy-${variant.versionName}-${variant.getFlavorName()}-${variant.buildType.name}.apk" - } } compileOptions { diff --git a/app/src/main/java/foundation/e/advancedprivacy/features/location/FakeLocationMapView.kt b/app/src/main/java/foundation/e/advancedprivacy/features/location/FakeLocationMapView.kt index ee301e88..bf4e19ab 100644 --- a/app/src/main/java/foundation/e/advancedprivacy/features/location/FakeLocationMapView.kt +++ b/app/src/main/java/foundation/e/advancedprivacy/features/location/FakeLocationMapView.kt @@ -31,6 +31,10 @@ class FakeLocationMapView @JvmOverloads constructor( defStyleAttr: Int = 0 ) : MapView(context, attrs, defStyleAttr) { + init { + System.loadLibrary("maplibre") + } + /** * Overrides onTouchEvent because this MapView is part of a scroll view * and we want this map view to consume all touch events originating on this view. -- GitLab