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

Perspectives from a Solutions Engineer

Perspectives from a Solutions Engineer

Presented at Droidcon America Online Nov 16, 2020

This talk covers some of the most common build issues causing slow Gradle builds from seeing many different builds as a Gradle Solutions engineer. This also covers future performance improvements to the Gradle Build tool regarding ease of use and performance.

Interested in a Gradle Enterprise Trial?
https://gradle.com/enterprise/trial/

Gradle is hiring Solutions Engineers
https://go.gradle.com/solutions-engineer

Video is available here: https://www.droidcon.com/media-detail?video=481160907

Nelson Osacky

November 16, 2020
Tweet

More Decks by Nelson Osacky

Other Decks in Programming

Transcript

  1. Perspectives from a Solutions Engineer •Why is productivity important? •What

    does Nelson do as a Solutions Engineer? •How can I make my build faster? •What is coming up in Gradle?
  2. Me • Previously Android Engineer • Large projects • SoundCloud

    • Square • Small startups • Solutions Engineer at Gradle
  3. Me • Gradle Plugin Maintainer • Fladle - Easily Scale

    Instrumentation Tests on Firebase https://github.com/runningcode/fladle • Delect - Replace Dagger with Dagger Reflect https://github.com/soundcloud/delect/ • Gradle Doctor - Actionable Insights for your build https://github.com/runningcode/gradle-doctor
  4. Cost of Builds 60s waste * 50 builds / day

    * 50 devs = 42 hours lost / day
  5. Cost of Builds 60s waste * 50 builds / day

    * 50 devs = 42 hours lost / day not including lost focus https://gradle.com/roi-calculator
  6. Cost of Builds 60s waste * 50 builds / day

    * 50 devs = 42 hours lost / day hire 5 new people without paying them! no recruiting https://gradle.com/roi-calculator
  7. Build Speed is Tech Debt And it always pays off

    And is easy to justify working on it
  8. I see a lot of builds from 10 person teams

    to 1000+ Android, Gradle and Maven
  9. Help prioritize issues with Gradle Build tools and Gradle Enterprise

    Present business cases for purchasing Gradle Enterprise
  10. Solutions Team at Gradle • Gary Hale • Daz Deboer

    • Etienne Studer • Nelson Osacky (me)
  11. Solutions Team at Gradle Supported by Operations and Build Tool

    teams help me sound like I know what I'm talking about
  12. Build Lifecycle Initialization Sets up the environment for the build

    and determines which projects will take part in it.
  13. Build Lifecycle Configuration All build scripts of all projects are

    executed. Constructs and configures the task graph.
  14. BUILD SUCCESSFUL in 5s 359 actionable tasks: 3 executed, 356

    up-to-date Publishing build scan... https://gradle.com/s/yj5jtd4kh6ucc Build Analyzer results available
  15. BUILD SUCCESSFUL in 5s 359 actionable tasks: 3 executed, 356

    up-to-date Publishing build scan... https://gradle.com/s/yj5jtd4kh6ucc Build Analyzer results available Gradle Build Scans Android Studio Build Analyzer
  16. plugins { id "com.github.plnice.canidropjetifier" version "0.5" } Can I drop

    Jetifier? ./gradlew -Pandroid.enableJetifier=false canIDropJetifier
  17. Update All The Things ⬢ Gradle 6.7 ⬢ Android Gradle

    Plugin 4.1.1 ⬢ Gradle Enterprise Plugin 3.5 ⬢ Kotlin 1.4.10 ⬢ Third party plugins ⬢ Third party libraries Stable File Watching Caching Improvements Task Configuration Avoidance Compressed scan upload Incremental Annotation Processors Fixes for caching bugs
  18. Update All The Things plugins { id "com.github.ben-manes.versions" version "0.33.0"

    } ./gradlew dependencyUpdates -Drevision=release https://github.com/ben-manes/gradle-versions-plugin
  19. Scaling Android Builds in Pandemic Times Inaki Villar 3:00pm PST

    - Nov 17th https://www.online.droidcon.com/americas-speaker/inaki-villar
  20. Idiomatic Gradle allProjects { repositories { mavenCentral() } } Central

    Repository Declaration https:///docs.gradle.org/6.8-milestone-3/release-notes.html#dependency-resolution-improvements
  21. Idiomatic Gradle dependencyResolutionManagement { components { withModule('com.google.guava:guava', GuavaRule) } }

    Central Component Metadata Rules https:///docs.gradle.org/6.8-milestone-3/release-notes.html#dependency-resolution-improvements
  22. Understanding, Profiling, and Optimizing Gradle in Android Builds Nate Ebel

    https://goobar.io/understanding-profiling-and-optimizing-gradle-in- android-builds/
  23. Build Bigger, Better: Gradle for Large Projects Google I/O 2019

    Aurimas Liutikas and Xavier Ducrohet https://www.youtube.com/watch?v=sQC9-Rj2yLI
  24. The Secrets of the Build Scan Plugin and the Internals

    of Gradle Virtual Android Makers Paris 2020 Me https://www.youtube.com/watch?v=lgaqS0pmUzk
  25. Scaling Android Builds in Pandemic Times Inaki Villar 3:00pm PST

    - Nov 17th https://www.online.droidcon.com/americas-speaker/inaki-villar
  26. Android Builds At Scale Zac Sweers, Chiu-Ki Chan, Israel Ferrero

    Camacho, John Rodriguez, Ivan Gavrilogic 1:10pm PST - Nov 17th https://www.online.droidcon.com/americas-panels-workshops