Legacy multidex slows down build significantly. • Android Studio 2.3+ will automatically avoid this when running from IDE when possible. productFlavors { development { minSdkVersion 21 ... } }
enable true ... } } • The splits{} block creates multiple smaller APKs that target specific device configurations for release. • Not needed during development.
change Time (s) Full build Incremental build Java change Incremental build resource change Time (s) Multi-APK Single APK Baseline (2.2.0) -4.8s (-12%) -3s (-26%) -0.5s (-6%)
◦ Incorrect code organization ◦ Build.gradle customization gone wild ◦ Incorrect settings (memory) • You need to spend some time understanding Gradle and your build.
plugin 3.0 https://d.android.com/studio/preview/features/new-android-plugin-migration.html Santa Tracker Project fork https://github.com/jmslau/santa-tracker-android Gradle profiler https://github.com/gradle/gradle-profiler More questions? Visit us at the Android/Play Sandbox!