Skip to content

Instantly share code, notes, and snippets.

@banasiak
Created August 27, 2018 17:23
Show Gist options
  • Save banasiak/0608fa6577fb214baf0d091ccd297323 to your computer and use it in GitHub Desktop.
Save banasiak/0608fa6577fb214baf0d091ccd297323 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo "Formatting code..."
./gradlew googleJavaFormat formatKotlin --daemon
status=$?
if [ "$status" = 0 ]; then
echo "Formatting complete - adding files to Git"
git add .
exit 0
else
echo 1>&2 "Unable to format code"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment