Skip to content

Instantly share code, notes, and snippets.

@tir38
Created May 23, 2019 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tir38/2c3a15bd1efd4cac2b3158785676f154 to your computer and use it in GitHub Desktop.
Save tir38/2c3a15bd1efd4cac2b3158785676f154 to your computer and use it in GitHub Desktop.
Profile / Scan your gradle builds https://youtu.be/sQC9-Rj2yLI?t=1697
#!/usr/bin/env bash
echo "restarting with fresh gradle daemon..."
./gradlew --stop
./gradlew clean
./gradlew --profile --offline --rerun-tasks app:assembleDebug
# Change "--profile --offline" to --scan to use Gradle's scan tool https://guides.gradle.org/creating-build-scans/
# Any build errors while profiling? remove --offline, try again, then re-add --offline
#!/usr/bin/env bash
echo "Only run this after initial profile with profileAppDebug and do NOT run clean in between. Then look in
report for tasks that are *not* marked UP-TO-DATE.\n\n".
./gradlew --profile --offline app:assembleDebug
# Change "--profile --offline" to --scan to use Gradle's scan tool https://guides.gradle.org/creating-build-scans/
# Any build errors while profiling? remove --offline, try again, then re-add --offline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment