BZ Media’s Android Developer Conference kicked off today in Santa Clara, headlined by keynote speaker Hans Dockter creator of the Gradle build system and CEO of Gradle. He showed off some of the improvements his company is working into future releases of the system.
Gradle is currently at version 2.9, but Dockter spoke about the Gradle plug-in for Android Studio 2.0. This new version of the Android IDE includes improvements aimed at speeding up the building and testing process.
Dockter said that an alpha version of version 2 features speeds up the build-to-emulation process from around 27 seconds to nearly three seconds. It does this, he said, by taking advantage of new capabilities in Android Studio that enable code to be changed inside of an Android application without having to rebuild the entire package. This feature is known as Instant Run, and he said “It will change the life of every Android developer.”
Android Studio 2.0 has changes that will also speed up the build process for Gradle users. Cold swapping will help to eliminate the need for a full recompile when changing code, and the new Emulator 2.0 will make the process of going from code to an app running in the desktop even faster.
Dockter said that the Gradle team is working heavily on optimizations and performance improvements for the new version of Android Studio and beyond. Many of these improvements are only possible in Android Studio and not available from the command line.
One of the reasons for this is that Gradle is able to rely on Android Studio’s automated checks and tests to be sure the code is buildable, rather than having to do that inside Gradle. Another reason is that Android Studio 2.0 has improved the performance of dexing—the process of building a Dalvik Executable File (DEX), which has previously been a large time-consumer during builds.
Dockter said, “It’s becoming fun for us to make Gradle faster, and faster.” While performance remains the main focus for now, he said that next year, the Gradle build tools for Android will see a number of improvements in other areas. He said that Gradle will add first-class support for microservices, as well as new NDK support based on Gradle’s native plug-in.
AnDevCon continues tomorrow and Thursday at the Santa Clara Convention Center.