diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5264174d554ccd32fc5301edb8fcf8c945c68f53..058a6918e2896ead996f25499b8ead17e68657ea 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 + - ./gradlew :app:assembleEosRelease :app:assembleEosReleaseNoLibs rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" when: never @@ -89,5 +89,6 @@ build-e-release: artifacts: paths: - - app/build/outputs/apk + - app/build/outputs/apk/eos/releaseNoLibs + - app/build/intermediates/merged_native_libs/eosRelease/mergeEosReleaseNativeLibs/out/lib - app/build/reports diff --git a/app/build.gradle b/app/build.gradle index 4e24ecb83271e7cf92d772c43ce13591a9333562..a00bce24287f28a39f4e9f0bd79234a2b2b2896c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -106,6 +106,16 @@ android { mainActivityIntentFilterCategory: "android.intent.category.INFO" ] + 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' } @@ -136,6 +146,13 @@ android { namespace 'foundation.e.advancedprivacy' } +// Required to exclude libs from one specific buildType: https://stackoverflow.com/a/78301183 +androidComponents { + onVariants(selector().withBuildType("releaseNoLibs"), { + packaging.jniLibs.excludes.add("/lib/**/*") + }) +} + dependencies { implementation project(':core') standaloneImplementation project(':permissionsstandalone')