Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Behind the Magic of Gradle

Behind the Magic of Gradle

If you are a Koltin (Android) developer, Gradle might by your primary (only) choice for a build tool. If you encounter Gradle for the first time and then need to configure your build, you are quickly confronted with a bunch of Groovy scripts. If you reaction is: "Groovy??!! What the %*??!!"

...then you are not alone.
Thousands of Android and Java developers had the same feeling once. But fear not! As Kotlin developer, you have another advantage over Java developers now: You can use a powerful build tool that you can configure without being forced to use yet another (scarily dynamic) language.

We will explore how Gradle and Kotlin work together on different levels. While we do this, we will look at some basic Gradle features you can leverage to make your builds better and which you can configure using...

by Jendrik Johannes
presented February 21, 2018 @car2go

Kotlin User Group Hamburg

February 21, 2018

More Decks by Kotlin User Group Hamburg

Other Decks in Programming


  1. > gradlew init --dsl kotlin --type kotlin-library
    - behind the magic of with -
    [email protected]

    View Slide

  2. A task automation and
    dependency management machine steered with otlin

    View Slide

  3. Takeaway
    • Try this at home: github.com/jjohannes/behind-the-magic-of-gradle-with-kotlin/commits/demo

    • Automate more! Write your own tiny tasks and plugins with Kotlin!

    • Use build cache: org.gradle.caching=true

    • Consider remote build cache: https://guides.gradle.org/using-build-cache/

    • Make sure not to break task input/output setup: try --scan

    • Make sure not to do unnecessary work at configuration time: try --scan

    • More on YouTube:


    • A builders intro to Kotlin – Jake Wharton


    • Powering up your builds with Kotlin – Nadav Cohen, Rodrigo B. de Oliveira


    • Build performance problems / Profiling Android builds – Stefan Oehme



    • … and much more

    • Try stuff, five feedback, ask questions!

    • Try our release candidates gradle.org/release-candidate | twitter.com/gradle

    • github.com/gradle/gradle/issues

    • github.com/gradle/kotlin-dsl/issues

    • discuss.gradle.org

    • slack.kotlinlang.org – #gradle

    • gradle.com/enterprise/trial
    [email protected]

    View Slide