From a38a3463378ee70df8ab26d035a0e42b9fe9aedc Mon Sep 17 00:00:00 2001 From: blagoev Date: Thu, 10 Mar 2022 09:54:16 +0200 Subject: [PATCH] fix android build dir (#291) * fix android build dir * update readme --- README.md | 5 +++++ scripts/build-android.sh | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index f0c9f2abf..95a3af283 100644 --- a/README.md +++ b/README.md @@ -349,6 +349,11 @@ The Realm Dart package is `realm_dart` ./scripts/build-macos.sh ``` +* Linux + ``` + ./scripts/build-linux.sh + ``` + ## Building Realm Dart * Windows diff --git a/scripts/build-android.sh b/scripts/build-android.sh index 61e7b1960..fa997bb32 100755 --- a/scripts/build-android.sh +++ b/scripts/build-android.sh @@ -8,12 +8,22 @@ set -o pipefail # Output is in PROJECT_DIR/binary directory # example usage: ../realm-dart$./scripts/build-android.sh all +if [ -z ${ANDROID_HOME} ]; then + echo "Environment variable ANDROID_HOME not set."; + exit 64 # Exit code 64 indicates a usage error. +fi + +if [ -z ${ANDROID_NDK} ]; then + echo "Environment variable ANDROID_NDK not set."; + exit 64 # Exit code 64 indicates a usage error. +fi # Start in the root directory of the project. cd "$(dirname "$0")/.." PROJECT_ROOT=$(pwd) mkdir -p build-android +pushd build-android # build for x86 first to optimize for emulator testing