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 Gouchet
April 01, 2019
Programming
1
36
Rock the Gradle, Rule the World
Xavier Gouchet
April 01, 2019
Tweet
Share
More Decks by Xavier Gouchet
See All by Xavier Gouchet
Libérez votre créativité
xgouchet
0
72
Unleash your Programming Creativity
xgouchet
0
120
Demystifying the Test Pyramid
xgouchet
1
380
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
67
Property Based Testing in Practice
xgouchet
0
55
Develop your CI tools
xgouchet
2
370
How to write a safe and reliable Open Source Library
xgouchet
1
230
Benchmarking your app's performance
xgouchet
0
190
Benchmarking your app's performance
xgouchet
0
89
Other Decks in Programming
See All in Programming
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
290
asdf-ecspresso作って 友達が増えた話 / Fujiwara Tech Conference 2025
koluku
0
1.4k
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
200
Package Traits
ikesyo
1
210
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
940
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
180
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
0
100
最近のVS Codeで気になるニュース 2025/01
74th
1
100
為你自己學 Python
eddie
0
520
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
250
良いユニットテストを書こう
mototakatsu
11
3.6k
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
1
450
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
96
5.3k
Code Review Best Practice
trishagee
65
17k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Thoughts on Productivity
jonyablonski
68
4.4k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Designing for Performance
lara
604
68k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Building Adaptive Systems
keathley
38
2.4k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
How to Ace a Technical Interview
jacobian
276
23k
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