Report a build failure when any Android build fails.

The travis script was only failing if the last Android build fails.
This changes the script to report a failure if any of the Android
projects fail to build.
This commit is contained in:
Stewart Miles
2017-10-13 16:56:28 -07:00
parent 9234ddcf11
commit 0780a7db24

View File

@@ -55,4 +55,4 @@ matrix:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi
script:
- for build_gradle in $(git ls-files | grep build.gradle); do ( cd "$(dirname "${build_gradle}")" && ./gradlew build ); done
- failed=0; for build_gradle in $(git ls-files | grep build.gradle); do ( cd "$(dirname "${build_gradle}")" && ./gradlew build ) || failed=1; done; exit $((failed))