Simple tips on how to speed up your Android builds.
This talk is inspired by Stefan Oehme ( Gradle, Lead Developer) talk on “IMPROVING ANDROID BUILD PERFORMANCE” - Droidcon Berlin 2018
What went wrong: A problem occurred evaluating project ':repository'. > Failed to apply plugin [id 'com.android.library'] > Configuration on demand is not supported by the current version of the Android Gradle plugin since you are using Gradle version 4.6 or above. Suggestion: disable configuration on demand by setting org.gradle.configureondemand=false in your gradle.properties file or use a Gradle version less than 4.6. Check gradle version - “instant run” is lost due to Android Studio & gradle incompatibility
Predexing builds dex file out of libraries so it can be used in incremental builds (not building dex files each time for libraries). Using this feature increases clean build time.
Processor which do support incremental builds - Google’s data-binding AP does NOT support it (work in progress) https://github.com/gradle/gradle/issues/5277 Incremental Annotation Processors:
an alias for ‘gradle-profiler’ Install gradle profiler: > ./gradlew installDist cp ./build/install/gradle-profiler/* ~/custom/gradle-profiler alias gradle-profiler='~/custom/gradle-profiler/bin/gradle-profiler'