Created
March 29, 2017 03:19
-
-
Save yukpiz/0bec0bd6b69aa0bf02d49c196a04e136 to your computer and use it in GitHub Desktop.
Build for Android application and library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
if [ "${1}" == "app" ]; then | |
# Build application. | |
./gradlew clean installDebug >> build.log 2>&1 | |
if [ $? == 0 ]; then | |
osascript -e 'display notification "Successfully build in Android application🐰 " with title "✅ Android Compile"' | |
else | |
osascript -e 'display notification "Failed to build in Android application🐰 " with title "❌ Android Compile"' | |
fi | |
elif [ "${1}" == "lib" ]; then | |
# Build library. | |
./gradlew clean assembleDebug archives >> build.log 2>&1 | |
if [ $? == 0 ]; then | |
osascript -e 'display notification "Successfully build in Android library🐼 " with title "✅ Android Compile"' | |
else | |
osascript -e 'display notification "Failed to build in Android library🐼 " with title "❌ Android Compile"' | |
fi | |
else | |
echo "Invalid Argument: please args [app|lib]" | |
exit 0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment