From 2a6bb4cb8f34a6523a7d27d423e163faf263f839 Mon Sep 17 00:00:00 2001 From: Pedro Pombeiro Date: Wed, 11 Jul 2018 18:43:52 +0200 Subject: [PATCH] Set JVM heap size in gradle.properties so that dex can run in-process Signed-off-by: Pedro Pombeiro --- android/gradle.properties | 2 ++ scripts/lib/setup/installers.sh | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/android/gradle.properties b/android/gradle.properties index 996680b3f4..3cf751ad69 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -30,3 +30,5 @@ android.enableAapt2=false # Disable Gradle Daemon https://stackoverflow.com/questions/38710327/jenkins-builds-fail-using-the-gradle-daemon org.gradle.daemon=false + +org.gradle.jvmargs=-Xmx4608M \ No newline at end of file diff --git a/scripts/lib/setup/installers.sh b/scripts/lib/setup/installers.sh index 599722bddd..df5230ab43 100755 --- a/scripts/lib/setup/installers.sh +++ b/scripts/lib/setup/installers.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +_localPropertiesPath=./android/local.properties + function install_node() { if nvm_installed; then install_node_via_nvm @@ -294,15 +296,14 @@ function dependency_setup() { } function use_android_sdk() { - _localPropertiesPath=./android/local.properties if [ -n "$ANDROID_SDK" ]; then if ! grep -Fq "sdk.dir" $_localPropertiesPath; then echo "sdk.dir=$ANDROID_SDK" | tee -a $_localPropertiesPath fi else - _docURL="https://docs.status.im/docs/build_status_linux.html" + local _docUrl="https://docs.status.im/docs/build_status_linux.html" if is_macos; then - _docURL="https://docs.status.im/docs/build_status_osx.html" + _docUrl="https://docs.status.im/docs/build_status_osx.html" fi cecho "@yellow[[ANDROID_SDK environment variable not defined, please install the Android SDK.]]" cecho "@yellow[[(see $_docUrl).]]" @@ -314,12 +315,11 @@ function use_android_sdk() { } function install_android_ndk() { - _localPropertiesPath=./android/local.properties if grep -Fq "ndk.dir" $_localPropertiesPath; then dependency_setup \ "pushd android && ./gradlew react-native-android:installArchives && popd" else - _ndkParentDir=~/Android/Sdk + local _ndkParentDir=~/Android/Sdk mkdir -p $_ndkParentDir cecho "@cyan[[Downloading Android NDK.]]" wget --output-document=android-ndk.zip https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip && \