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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Xavier F. Gouchet
April 01, 2019
Programming
63
0
Share
Rock the Gradle, Rule the World
Xavier F. Gouchet
April 01, 2019
More Decks by Xavier F. Gouchet
See All by Xavier F. Gouchet
Writing a Kotlin Compiler Plugin
xgouchet
0
67
Being an ethical software engineer
xgouchet
0
330
Libérez votre créativité
xgouchet
0
150
Unleash your Programming Creativity
xgouchet
0
220
Demystifying the Test Pyramid
xgouchet
1
690
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
140
Property Based Testing in Practice
xgouchet
0
110
Develop your CI tools
xgouchet
2
480
How to write a safe and reliable Open Source Library
xgouchet
1
330
Other Decks in Programming
See All in Programming
Don't Prompt Harder, Structure Better
kitasuke
0
790
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
260
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
890
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
2k
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
2.7k
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
450
Programming with a DJ Controller — not vibe coding
m_seki
3
650
[RubyKaigi 2026] Require Hooks
palkan
1
260
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
910
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
140
個人的に嬉しかったpnpmの新機能・3選
matsuo_atsushi
0
110
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
4 Signs Your Business is Dying
shpigford
187
22k
For a Future-Friendly Web
brad_frost
183
10k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Facilitating Awesome Meetings
lara
57
6.8k
Paper Plane
katiecoart
PRO
1
49k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
190
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
450
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.2k
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