diff --git a/scripts/android/cmake_android.sh b/scripts/android/cmake_android.sh index 474576600..976ca87b6 100755 --- a/scripts/android/cmake_android.sh +++ b/scripts/android/cmake_android.sh @@ -151,21 +151,40 @@ mkdir "${_DEFAULT_BUILD_FOLDER}" if [[ "${_DEFAULT_ANDROID_BUILD}" == "arm" || "${_DEFAULT_ANDROID_BUILD}" == "all" ]]; then build_for_type arm armeabi-v7a armv7-linux-androideabi & + PID_BUILD_ARM=$! fi if [[ "${_DEFAULT_ANDROID_BUILD}" == "arm64" || "${_DEFAULT_ANDROID_BUILD}" == "all" ]]; then build_for_type arm64 arm64-v8a aarch64-linux-android & + PID_BUILD_ARM64=$! fi if [[ "${_DEFAULT_ANDROID_BUILD}" == "x86" || "${_DEFAULT_ANDROID_BUILD}" == "all" ]]; then build_for_type x86 x86 i686-linux-android & + PID_BUILD_X86=$! fi if [[ "${_DEFAULT_ANDROID_BUILD}" == "x86_64" || "${_DEFAULT_ANDROID_BUILD}" == "x64" || "${_DEFAULT_ANDROID_BUILD}" == "all" ]]; then build_for_type x86_64 x86_64 x86_64-linux-android & + PID_BUILD_X86_64=$! fi -wait +if [ -n "$PID_BUILD_ARM" ] && ! wait "$PID_BUILD_ARM"; then + printf "\e[31m%s\e[30m\n" "Building for arm failed" + exit 1 +fi +if [ -n "$PID_BUILD_ARM64" ] && ! wait "$PID_BUILD_ARM64"; then + printf "\e[31m%s\e[30m\n" "Building for arm64 failed" + exit 1 +fi +if [ -n "$PID_BUILD_X86" ] && ! wait "$PID_BUILD_X86"; then + printf "\e[31m%s\e[30m\n" "Building for x86 failed" + exit 1 +fi +if [ -n "$PID_BUILD_X86_64" ] && ! wait "$PID_BUILD_X86_64"; then + printf "\e[31m%s\e[30m\n" "Building for x86_64 failed" + exit 1 +fi printf "\e[36mPreparing gradle build\n"