Skip to content

Commit

Permalink
drop x86 and x86_64 for non-e2e or dev builds
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed Jun 11, 2019
1 parent e925b2d commit eb4ba4c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 16 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ HELP_FUN = \
}
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 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
Expand Down Expand Up @@ -101,21 +103,22 @@ prod-build:
lein prod-build

prod-build-android: export TARGET_OS ?= android
prod-build-android: export BUILD_ENV ?= prod
prod-build-android:
BUILD_ENV=prod lein prod-build-android && \
lein prod-build-android && \
node prepare-modules.js

prod-build-ios: export TARGET_OS ?= ios
prod-build-ios: export BUILD_ENV = prod
prod-build-ios: export BUILD_ENV ?= prod
prod-build-ios:
BUILD_ENV=prod lein prod-build-ios && \
lein prod-build-ios && \
node prepare-modules.js

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:
git clean -qdxf -f ./index.desktop.js desktop/ && \
BUILD_ENV=prod lein prod-build-desktop && \
lein prod-build-desktop && \
node prepare-modules.js

#--------------
Expand Down
7 changes: 2 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}



defaultConfig {
applicationId "im.status.ethereum"
minSdkVersion 23
Expand All @@ -159,7 +157,7 @@ android {
versionCode getVersionCode()
versionName getVersionName()
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86-64"
abiFilters getEnvOrConfig('NDK_ABI_FILTERS').split(';')
}
}
/**
Expand All @@ -179,7 +177,6 @@ android {
exclude 'META-INF/rxjava.properties'
exclude '/lib/mips64/**'
exclude '/lib/arm64-v8a/**'
exclude '/lib/x86_64/**'
/** Fix for: Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'.
* with recent version of ndk (17.0.4754217)
*/
Expand All @@ -204,7 +201,7 @@ android {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
include "armeabi-v7a", "arm64-v8a", "x86"
}
}
buildTypes {
Expand Down
3 changes: 3 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ STATUS_RELEASE_STORE_PASSWORD=password
STATUS_RELEASE_KEY_ALIAS=status
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
18 changes: 12 additions & 6 deletions ci/android.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@ def bundle() {
/* 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 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') {
/* PR builds shouldn't replace normal releases */
target = 'pr'
} else if (btype == 'release') {
gradleOpt += "-PreleaseVersion='${utils.getVersion()}'"
switch (btype) {
case 'pr': /* PR builds shouldn't replace normal releases */
target = 'pr'; break;
case 'e2e':
target = 'pr';
env.NDK_ABI_FILTERS="x86"; break
case 'release':
gradleOpt += "-PreleaseVersion='${utils.getVersion('mobile_files')}'"
}

dir('android') {
withCredentials([
string(
Expand All @@ -28,7 +34,7 @@ def bundle() {
nix.shell(
"./gradlew assemble${target.capitalize()} ${gradleOpt}",
keep: [
'REALM_DISABLE_ANALYTICS',
'REALM_DISABLE_ANALYTICS', 'NDK_ABI_FILTERS',
'STATUS_RELEASE_STORE_FILE', 'STATUS_RELEASE_STORE_PASSWORD',
'STATUS_RELEASE_KEY_ALIAS', 'STATUS_RELEASE_KEY_PASSWORD'
]
Expand Down

0 comments on commit eb4ba4c

Please sign in to comment.