From 110475a9736f29933b113a0c7ceea8093301b4c3 Mon Sep 17 00:00:00 2001 From: Siddarth Kumar Date: Thu, 5 Sep 2024 14:31:03 +0530 Subject: [PATCH] fixes for building universal APK (#21175) In my previous PR -> https://github.com/status-im/status-mobile/pull/21163 I had attempted to build universalAPK only for release builds but had missed out on these changes. This commit ensures `universalApk` value of `gradle` config is properly set. This commit also points to my branch in `status-jenkins-lib` which modifies the APK size restrictions. Its not `110 MB` for Universal APKs and `70 MB` for Individual Architecture APKs --- android/app/build.gradle | 2 +- ci/Jenkinsfile.android | 2 +- ci/Jenkinsfile.combined | 2 +- ci/Jenkinsfile.e2e-nightly | 2 +- ci/Jenkinsfile.ios | 2 +- ci/Jenkinsfile.tests | 2 +- ci/tests/Jenkinsfile.e2e-nightly | 2 +- ci/tests/Jenkinsfile.e2e-prs | 2 +- ci/tests/Jenkinsfile.e2e-upgrade | 2 +- ci/tools/Jenkinsfile.fastlane-clean | 2 +- ci/tools/Jenkinsfile.nix-cache | 2 +- ci/tools/Jenkinsfile.playstore-meta | 2 +- ci/tools/Jenkinsfile.xcode-clean | 2 +- nix/mobile/android/build.nix | 2 ++ 14 files changed, 15 insertions(+), 13 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 06b2d66f5a..c086b3a560 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -211,7 +211,7 @@ android { reset() enable getEnvOrConfig('ANDROID_ABI_SPLIT').toBoolean() include getEnvOrConfig('ANDROID_ABI_INCLUDE').split(";") - universalApk false + universalApk getEnvOrConfig('ORG_GRADLE_PROJECT_universalApk').toBoolean() } } signingConfigs { diff --git a/ci/Jenkinsfile.android b/ci/Jenkinsfile.android index 33b0593c18..8402e1e100 100644 --- a/ci/Jenkinsfile.android +++ b/ci/Jenkinsfile.android @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.8' +library 'status-jenkins-lib@v1.9.9' /* Options section can't access functions in objects. */ def isPRBuild = utils.isPRBuild() diff --git a/ci/Jenkinsfile.combined b/ci/Jenkinsfile.combined index 31ec595618..66eb6ac2ed 100644 --- a/ci/Jenkinsfile.combined +++ b/ci/Jenkinsfile.combined @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.8' +library 'status-jenkins-lib@v1.9.9' import groovy.json.JsonBuilder diff --git a/ci/Jenkinsfile.e2e-nightly b/ci/Jenkinsfile.e2e-nightly index 42b1270009..f463f9263c 100644 --- a/ci/Jenkinsfile.e2e-nightly +++ b/ci/Jenkinsfile.e2e-nightly @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.8' +library 'status-jenkins-lib@v1.9.9' pipeline { agent { label 'linux' } diff --git a/ci/Jenkinsfile.ios b/ci/Jenkinsfile.ios index 6f477f22fd..915e49b7d3 100644 --- a/ci/Jenkinsfile.ios +++ b/ci/Jenkinsfile.ios @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.8' +library 'status-jenkins-lib@v1.9.9' /* Options section can't access functions in objects. */ def isPRBuild = utils.isPRBuild() diff --git a/ci/Jenkinsfile.tests b/ci/Jenkinsfile.tests index d1260e8f90..ba9d17a398 100644 --- a/ci/Jenkinsfile.tests +++ b/ci/Jenkinsfile.tests @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.8' +library 'status-jenkins-lib@v1.9.9' /* Options section can't access functions in objects. */ def isPRBuild = utils.isPRBuild() diff --git a/ci/tests/Jenkinsfile.e2e-nightly b/ci/tests/Jenkinsfile.e2e-nightly index a32f4fbf70..00cb28bee8 100644 --- a/ci/tests/Jenkinsfile.e2e-nightly +++ b/ci/tests/Jenkinsfile.e2e-nightly @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.8' +library 'status-jenkins-lib@v1.9.9' pipeline { diff --git a/ci/tests/Jenkinsfile.e2e-prs b/ci/tests/Jenkinsfile.e2e-prs index 084434cf36..d04ecf63e1 100644 --- a/ci/tests/Jenkinsfile.e2e-prs +++ b/ci/tests/Jenkinsfile.e2e-prs @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.8' +library 'status-jenkins-lib@v1.9.9' pipeline { diff --git a/ci/tests/Jenkinsfile.e2e-upgrade b/ci/tests/Jenkinsfile.e2e-upgrade index 2b952a377b..bbc9db9a7b 100644 --- a/ci/tests/Jenkinsfile.e2e-upgrade +++ b/ci/tests/Jenkinsfile.e2e-upgrade @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.8' +library 'status-jenkins-lib@v1.9.9' pipeline { diff --git a/ci/tools/Jenkinsfile.fastlane-clean b/ci/tools/Jenkinsfile.fastlane-clean index e2f89999b1..a363125eb7 100644 --- a/ci/tools/Jenkinsfile.fastlane-clean +++ b/ci/tools/Jenkinsfile.fastlane-clean @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.8' +library 'status-jenkins-lib@v1.9.9' pipeline { agent { label 'macos' } diff --git a/ci/tools/Jenkinsfile.nix-cache b/ci/tools/Jenkinsfile.nix-cache index 625f3f1d00..89e3b74a5d 100644 --- a/ci/tools/Jenkinsfile.nix-cache +++ b/ci/tools/Jenkinsfile.nix-cache @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.8' +library 'status-jenkins-lib@v1.9.9' pipeline { agent { label params.AGENT_LABEL } diff --git a/ci/tools/Jenkinsfile.playstore-meta b/ci/tools/Jenkinsfile.playstore-meta index c545ec37c8..bb14a61e48 100644 --- a/ci/tools/Jenkinsfile.playstore-meta +++ b/ci/tools/Jenkinsfile.playstore-meta @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.8' +library 'status-jenkins-lib@v1.9.9' pipeline { agent { label 'linux' } diff --git a/ci/tools/Jenkinsfile.xcode-clean b/ci/tools/Jenkinsfile.xcode-clean index ad10492d4f..1e5baa5390 100644 --- a/ci/tools/Jenkinsfile.xcode-clean +++ b/ci/tools/Jenkinsfile.xcode-clean @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.8' +library 'status-jenkins-lib@v1.9.9' pipeline { agent { diff --git a/nix/mobile/android/build.nix b/nix/mobile/android/build.nix index 83136dc54b..303cd92f89 100644 --- a/nix/mobile/android/build.nix +++ b/nix/mobile/android/build.nix @@ -23,6 +23,7 @@ # Android architectures to build for # Used to detect end-to-end builds androidAbiInclude ? lib.getEnvWithDefault "ANDROID_ABI_INCLUDE" "arm64-v8a", + universalApk ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_universalApk" "false" }: let @@ -89,6 +90,7 @@ in stdenv.mkDerivation rec { ORG_GRADLE_PROJECT_commitHash = commitHash; ORG_GRADLE_PROJECT_buildUrl = buildUrl; ORG_GRADLE_PROJECT_hermesEnabled = hermesEnabled; + ORG_GRADLE_PROJECT_universalApk = universalApk; # Fix for ERR_OSSL_EVP_UNSUPPORTED error. NODE_OPTIONS = "--openssl-legacy-provider";