A practical technique for diagnosing slow Android builds using Gradle build scan custom tags. By instrumenting compilation and annotation processing tasks (KotlinCompile, Kapt, AndroidJavaCompile) to measure their duration and tag builds exceeding a threshold with 'TooLong', teams can use Gradle Enterprise to search, filter, and analyze problematic builds. The approach includes recording the specific task path as a custom value, enabling precise root cause identification across many builds.

2m read timeFrom blog.gradle.org
Post cover image
Table of contents
Table of ContentsIntroductionFurther reading #Discuss

Sort: