Extreme developer productivity with Gradle 4.0

Overview of Gradle

Gradle
(management summary)

  • Multi purpose software automation tool

  • Build, automate and deliver better software, faster

  • Cross-platform

  • Language agnostic

  • Apache v2 licensed

  • A Build Tool + Gradle Enterprise (on premise + cloud)

Momentum

  • ~30 full time engineers working on Gradle

  • 3.0 released on August 15th 2016

  • 3.4 released on February 20th 2016

  • 3.5 released on April 10th 2017

  • 4.0 released on June 14th 2017

  • Releasing every 4 - 6 weeks.

  • 3-5 million downloads per month

Developer productivity

Influences on
developer productivity

  • IDE

  • Languages and frameworks

  • Good hardware

  • Training

  • Food in cafeteria

Four pillars of
developer productivity

  • Fast feedback cycles

  • High degree of automation

  • Faster debugging

  • Productivity culture

Fast feedback cycles

  • Maximum build performance

  • Measure and optimize

  • Build reliability

Maximum build performance

Maximum build performance is the maximum achievable performance of a build system for your code base.

Test projects

  • Large monolithic: 1 prj, 50000 src

  • Small multiproject: 10 prj, 100 src/prj

  • Medium multiproject: 100 prj, 100 src/prj

  • Large multiproject: 500 prj, 100 src/prj

Gradle is up to 100 times faster than Maven

How

  • Compile avoidance

  • Incremental compilation

Build cache

Gradle is reusing results
from last time
when we ran this build

on this machine.

Gradle can do better

Why not…​

from anytime before
when we ran any build
anywhere.

Build cache

$> gradle --build-cache assemble
Build cache is an incubating feature.
:compileJava FROM-CACHE
:processResources
:classes
:jar
:assemble

BUILD SUCCESSFUL

Build cache

Performance roadmap

  • Worker API (aka. parallel by default)

  • Incremental compile with annotation processors

  • Cacheable Scala and C/C++ tasks

  • Faster configuration time

  • N-Level build caches

  • Multi-location support for cache backend

Measure and optimize

  • Need data

    • CI server captures times

    • What about developer builds

  • Enter build scans

Build reliability

  • Reliable parallelism

  • Cache is a forcing function

  • Reliable configure on demand

  • Build scans for debugging

Higher degree of automation

Composite build

  • Works now with --continuous

  • Excellent IDE integration (Eclipse/Intellij)

  • Parallel composite build

Composite build - roadmap

  • Integration with build scans

  • Make substitution configureable

  • Composite task names

Variants

What is wrong with this:

dependencies {
    compile project(':lib')
}

Variants

dependencies {
    implementation project(':lib')
}

Variants - roadmap

  • Source dependencies

  • Swift support

  • Variant aware DM for Binary repositories

Faster debugging

  • Build scans!

  • Traceability

  • Custom values

Productivity Culture

  • Accountability

  • Professionalization

  • Product vs Support

Developer experience

Guides

guides

Console improvements

  • New console output

  • Commandline completion

Console improvements

console output

Kotlin DSL

  • Kotlin DSL version 0.10 (Gradle 4.1)

  • Statically typed

  • Good IDE support

More resources

Learn more at www.gradle.org

Thank you!