Last active
March 12, 2020 11:57
-
-
Save akhgupta/df84c3d84f6557b49090d177478518db to your computer and use it in GitHub Desktop.
gradlew Shell script Wrapper to Suspend Android Studio before running Gradle Task and resuming once Task is completed
This file contains 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
#!/usr/bin/env bash | |
echo | |
pkill -SIGSTOP studio | |
printf "============> Suspending Android Studio <============" | |
gradleCommand="./gradlew ${@}" | |
eval ${gradleCommand} | |
pkill -SIGCONT studio | |
printf "============> Resume Android Studio <============" | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just replace
./gradlew
with./gradlewSuspendAS.sh
For example:
./gradlewSuspendAS.sh :app:assembleDebug