Presentation given at droidcon KE, Nairobi, 2019
Abstract:
Gradle is the most popular build system in use today for building Android projects. It is an amazing tool that has improved how we build projects especially when we compare to the previous build systems used for Android development.
As your project starts to scale, so does the Gradle setup start to get complicated - from build performance, to configuring plugins, to managing dependencies, to managing multiple modules. Gradle by default makes use of Groovy language, which often does not provide the full features of static typing - hence making it more difficult to customize.
If like me, you’re in a love-hate relationship with Gradle, then, this talk is for you.
In this talk, we will go through top tips to make Gradle work for us as Android developers.
We will talk about different quick wins to make maintaining our Gradle configuration easy by:
avoiding repetitive code as your project modules continue to grow, and
writing your build configuration partly or fully in Kotlin, hence taking advantage of the Kotlin DSL feature.
You will leave this talk with a lot of ideas of how to improve the Gradle setup of your project.
Most of these ideas will be something you can immediately implement while some may require a little more effort. Ultimately we will be able to make Gradle work for you to achieve the best results.
Resource links in the slides:
https://handstandsam.com/2019/03/12/sharing-gradle-configuration-in-multi-module-android-projects/
https://segunfamisa.com/posts/android-gradle-extra-properties
https://gradle.com/blog/getting-started-with-gradle-kotlin-dsl/
https://github.com/gradle/kotlin-dsl
https://blog.codinghorror.com/rule-of-three/