Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rock the Gradle, Rule the World
Search
Xavier F. Gouchet
PRO
April 01, 2019
Programming
61
0
Share
Rock the Gradle, Rule the World
Xavier F. Gouchet
PRO
April 01, 2019
More Decks by Xavier F. Gouchet
See All by Xavier F. Gouchet
Writing a Kotlin Compiler Plugin
xgouchet
PRO
0
66
Being an ethical software engineer
xgouchet
PRO
0
330
Libérez votre créativité
xgouchet
PRO
0
150
Unleash your Programming Creativity
xgouchet
PRO
0
210
Demystifying the Test Pyramid
xgouchet
PRO
1
680
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
130
Property Based Testing in Practice
xgouchet
PRO
0
100
Develop your CI tools
xgouchet
PRO
2
470
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
330
Other Decks in Programming
See All in Programming
AIと共にエンジニアとPMの “二刀流”を実現する
naruogram
0
120
へんな働き方
yusukebe
6
2.9k
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
550
20260320登壇資料
pharct
0
160
Feature Toggle は捨てやすく使おう
gennei
0
410
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
220
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
240
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
200
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
3
500
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
3
260
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
110
AI活用のコスパを最大化する方法
ochtum
0
370
Featured
See All Featured
Unsuck your backbone
ammeep
672
58k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
500
Information Architects: The Missing Link in Design Systems
soysaucechin
0
860
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
95
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Six Lessons from altMBA
skipperchong
29
4.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Being A Developer After 40
akosma
91
590k
For a Future-Friendly Web
brad_frost
183
10k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
96
Transcript
Rock the Gradle Rule the world
About… Lead Android Engineer at WorkWell Fluent in Android since
Cupcake 2
A brief introduction 1
Dependency Management System What is Gradle General Purpose Build management
4
5 General purpose Language agnostic Feature agnostic
6 Dependency management system Knows how to graph and resolve
dependencies ◇ code ◇ tasks ◇ …
7 Build management Based on tasks created by plugins
Configuration Gradle flow Initialisation Execution 8
9 Initialisation Launches the JVM (with proper params) Analyse the
working directory Reads the settings.gradle file Creates the Project object(s) that will be used Compiles, test and add buildSrc to the classpath
10 Configuration Execute all the build.gradle scripts in the project
Create all the Task objects and configure the Project object(s) Resolves the tasks dependencies
11 Execution List the Task to run based on the
invocation (and their dependencies) Execute each of the tasks
Meet the buildSrc folder 2
Project structure ┬ MyProject ├┬ app/ │├── src/ │└── build.gradle
├┬ buildSrc/ │├── src/ │├── build.gradle │└── settings.gradle ├─ build.gradle └─ settings.gradle 13
Purposes… ◇ Better dependency management ◇ Helper classes / methods
◇ Custom tasks in dedicated classes ◇ Custom plugin ■ Locally versionned with the project 14
How does it work? ◇ Works like any module in
your project ◇ Compiled and tested before any gradle task ◇ Groovy, Java, Kotlin, … ◇ Any public class / method becomes availble in gradle scripts 15
“ A change in buildSrc causes the whole project to
become out-of-date. 16
apply plugin: 'groovy' dependencies { compile gradleApi() compile localGroovy() }
17 Default build.gradle
Writin a Plugin 3
Hands On 19
Thanks! Any questions? ◇ https://github.com/xgouchet/RockTheGradle ◇ @xgouchet 20