drop x86 and x86_64 for non-e2e or dev builds

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-05-31 14:39:53 -04:00
parent e925b2dc46
commit eb4ba4c50e
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
4 changed files with 25 additions and 16 deletions

View File

@ -26,6 +26,8 @@ HELP_FUN = \
} }
HOST_OS := $(shell uname | tr '[:upper:]' '[:lower:]') HOST_OS := $(shell uname | tr '[:upper:]' '[:lower:]')
# Defines which variables will be kept for Nix pure shell, use semicolon as divider
export NIX_KEEP ?= BUILD_ENV
export NIX_CONF_DIR = $(PWD)/nix export NIX_CONF_DIR = $(PWD)/nix
export REACT_SERVER_PORT ?= 5001 # any value different from default 5000 will work; this has to be specified for both the Node.JS server process and the Qt process export REACT_SERVER_PORT ?= 5001 # any value different from default 5000 will work; this has to be specified for both the Node.JS server process and the Qt process
@ -101,21 +103,22 @@ prod-build:
lein prod-build lein prod-build
prod-build-android: export TARGET_OS ?= android prod-build-android: export TARGET_OS ?= android
prod-build-android: export BUILD_ENV ?= prod
prod-build-android: prod-build-android:
BUILD_ENV=prod lein prod-build-android && \ lein prod-build-android && \
node prepare-modules.js node prepare-modules.js
prod-build-ios: export TARGET_OS ?= ios prod-build-ios: export TARGET_OS ?= ios
prod-build-ios: export BUILD_ENV = prod prod-build-ios: export BUILD_ENV ?= prod
prod-build-ios: prod-build-ios:
BUILD_ENV=prod lein prod-build-ios && \ lein prod-build-ios && \
node prepare-modules.js node prepare-modules.js
prod-build-desktop: export TARGET_OS ?= $(HOST_OS) prod-build-desktop: export TARGET_OS ?= $(HOST_OS)
prod-build-desktop: export BUILD_ENV = prod prod-build-desktop: export BUILD_ENV ?= prod
prod-build-desktop: prod-build-desktop:
git clean -qdxf -f ./index.desktop.js desktop/ && \ git clean -qdxf -f ./index.desktop.js desktop/ && \
BUILD_ENV=prod lein prod-build-desktop && \ lein prod-build-desktop && \
node prepare-modules.js node prepare-modules.js
#-------------- #--------------

View File

@ -149,8 +149,6 @@ android {
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8
} }
defaultConfig { defaultConfig {
applicationId "im.status.ethereum" applicationId "im.status.ethereum"
minSdkVersion 23 minSdkVersion 23
@ -159,7 +157,7 @@ android {
versionCode getVersionCode() versionCode getVersionCode()
versionName getVersionName() versionName getVersionName()
ndk { ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86-64" abiFilters getEnvOrConfig('NDK_ABI_FILTERS').split(';')
} }
} }
/** /**
@ -179,7 +177,6 @@ android {
exclude 'META-INF/rxjava.properties' exclude 'META-INF/rxjava.properties'
exclude '/lib/mips64/**' exclude '/lib/mips64/**'
exclude '/lib/arm64-v8a/**' exclude '/lib/arm64-v8a/**'
exclude '/lib/x86_64/**'
/** Fix for: Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'. /** Fix for: Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'.
* with recent version of ndk (17.0.4754217) * with recent version of ndk (17.0.4754217)
*/ */
@ -204,7 +201,7 @@ android {
reset() reset()
enable enableSeparateBuildPerCPUArchitecture enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86" include "armeabi-v7a", "arm64-v8a", "x86"
} }
} }
buildTypes { buildTypes {

View File

@ -24,4 +24,7 @@ STATUS_RELEASE_STORE_PASSWORD=password
STATUS_RELEASE_KEY_ALIAS=status STATUS_RELEASE_KEY_ALIAS=status
STATUS_RELEASE_KEY_PASSWORD=password STATUS_RELEASE_KEY_PASSWORD=password
# platforms for which to build the Android bundle
NDK_ABI_FILTERS=armeabi-v7a;arm64-v8a;x86
org.gradle.jvmargs=-Xmx8704M org.gradle.jvmargs=-Xmx8704M

View File

@ -6,13 +6,19 @@ def bundle() {
/* Disable Gradle Daemon https://stackoverflow.com/questions/38710327/jenkins-builds-fail-using-the-gradle-daemon */ /* Disable Gradle Daemon https://stackoverflow.com/questions/38710327/jenkins-builds-fail-using-the-gradle-daemon */
def gradleOpt = "-PbuildUrl='${currentBuild.absoluteUrl}' -Dorg.gradle.daemon=false " def gradleOpt = "-PbuildUrl='${currentBuild.absoluteUrl}' -Dorg.gradle.daemon=false "
def target = "release" def target = "release"
/* we don't need x86 for any builds except e2e */
env.NDK_ABI_FILTERS="armeabi-v7a;arm64-v8a"
if (params.BUILD_TYPE == 'pr') { switch (btype) {
/* PR builds shouldn't replace normal releases */ case 'pr': /* PR builds shouldn't replace normal releases */
target = 'pr' target = 'pr'; break;
} else if (btype == 'release') { case 'e2e':
gradleOpt += "-PreleaseVersion='${utils.getVersion()}'" target = 'pr';
env.NDK_ABI_FILTERS="x86"; break
case 'release':
gradleOpt += "-PreleaseVersion='${utils.getVersion('mobile_files')}'"
} }
dir('android') { dir('android') {
withCredentials([ withCredentials([
string( string(
@ -28,7 +34,7 @@ def bundle() {
nix.shell( nix.shell(
"./gradlew assemble${target.capitalize()} ${gradleOpt}", "./gradlew assemble${target.capitalize()} ${gradleOpt}",
keep: [ keep: [
'REALM_DISABLE_ANALYTICS', 'REALM_DISABLE_ANALYTICS', 'NDK_ABI_FILTERS',
'STATUS_RELEASE_STORE_FILE', 'STATUS_RELEASE_STORE_PASSWORD', 'STATUS_RELEASE_STORE_FILE', 'STATUS_RELEASE_STORE_PASSWORD',
'STATUS_RELEASE_KEY_ALIAS', 'STATUS_RELEASE_KEY_PASSWORD' 'STATUS_RELEASE_KEY_ALIAS', 'STATUS_RELEASE_KEY_PASSWORD'
] ]