Set JVM heap size in gradle.properties so that dex can run in-process
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
parent
242c42ef3a
commit
2a6bb4cb8f
|
@ -30,3 +30,5 @@ android.enableAapt2=false
|
||||||
|
|
||||||
# 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
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
|
org.gradle.jvmargs=-Xmx4608M
|
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
_localPropertiesPath=./android/local.properties
|
||||||
|
|
||||||
function install_node() {
|
function install_node() {
|
||||||
if nvm_installed; then
|
if nvm_installed; then
|
||||||
install_node_via_nvm
|
install_node_via_nvm
|
||||||
|
@ -294,15 +296,14 @@ function dependency_setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function use_android_sdk() {
|
function use_android_sdk() {
|
||||||
_localPropertiesPath=./android/local.properties
|
|
||||||
if [ -n "$ANDROID_SDK" ]; then
|
if [ -n "$ANDROID_SDK" ]; then
|
||||||
if ! grep -Fq "sdk.dir" $_localPropertiesPath; then
|
if ! grep -Fq "sdk.dir" $_localPropertiesPath; then
|
||||||
echo "sdk.dir=$ANDROID_SDK" | tee -a $_localPropertiesPath
|
echo "sdk.dir=$ANDROID_SDK" | tee -a $_localPropertiesPath
|
||||||
fi
|
fi
|
||||||
else
|
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
|
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
|
fi
|
||||||
cecho "@yellow[[ANDROID_SDK environment variable not defined, please install the Android SDK.]]"
|
cecho "@yellow[[ANDROID_SDK environment variable not defined, please install the Android SDK.]]"
|
||||||
cecho "@yellow[[(see $_docUrl).]]"
|
cecho "@yellow[[(see $_docUrl).]]"
|
||||||
|
@ -314,12 +315,11 @@ function use_android_sdk() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_android_ndk() {
|
function install_android_ndk() {
|
||||||
_localPropertiesPath=./android/local.properties
|
|
||||||
if grep -Fq "ndk.dir" $_localPropertiesPath; then
|
if grep -Fq "ndk.dir" $_localPropertiesPath; then
|
||||||
dependency_setup \
|
dependency_setup \
|
||||||
"pushd android && ./gradlew react-native-android:installArchives && popd"
|
"pushd android && ./gradlew react-native-android:installArchives && popd"
|
||||||
else
|
else
|
||||||
_ndkParentDir=~/Android/Sdk
|
local _ndkParentDir=~/Android/Sdk
|
||||||
mkdir -p $_ndkParentDir
|
mkdir -p $_ndkParentDir
|
||||||
cecho "@cyan[[Downloading Android NDK.]]"
|
cecho "@cyan[[Downloading Android NDK.]]"
|
||||||
wget --output-document=android-ndk.zip https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip && \
|
wget --output-document=android-ndk.zip https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip && \
|
||||||
|
|
Loading…
Reference in New Issue