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
26
Rock the Gradle, Rule the World
Xavier Gouchet
April 01, 2019
Tweet
Share
More Decks by Xavier Gouchet
See All by Xavier Gouchet
Unleash your Programming Creativity
xgouchet
0
45
Demystifying the Test Pyramid
xgouchet
1
250
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
49
Property Based Testing in Practice
xgouchet
0
44
Develop your CI tools
xgouchet
2
350
How to write a safe and reliable Open Source Library
xgouchet
1
220
Benchmarking your app's performance
xgouchet
0
160
Benchmarking your app's performance
xgouchet
0
76
It's time to up your test game
xgouchet
1
110
Other Decks in Programming
See All in Programming
戦略的DDDは重いのか? / Is strategic DDD heavy?
pictiny
3
2.1k
slog登場に伴うloggerの取り回し手法の見直し / kamakura.go #6
arthur1
0
120
Try creating your own orderedmap
kazamori
1
280
TypeScriptコードの漸進的改善 / Progressive Improvement of TypeScript Code
medley
1
430
Escolhendo (ou não) o melhor ORM para o seu projeto
andreiacsilva
1
160
PHPコードの実行モデルを理解する / Understanding-the-PHP-Execution-Model
shin1x1
0
1.1k
CQRS meets modern Java
simas
PRO
2
470
RubyGems on ruby.wasm
kateinoigakukun
0
110
仕様と実装で学ぶOpenTelemetry
drumato
2
910
酒飲んでたらテックリードになった話
spbaya0141
0
210
最近コードレビューで指摘したこと
forrep
3
110
Next.js App Router
quramy
14
2.3k
Featured
See All Featured
The Brand Is Dead. Long Live the Brand.
mthomps
49
30k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6.1k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
The Invisible Customer
myddelton
114
12k
Rebuilding a faster, lazier Slack
samanthasiow
74
8.3k
Designing on Purpose - Digital PM Summit 2013
jponch
111
6.5k
Optimizing for Happiness
mojombo
370
69k
Code Reviewing Like a Champion
maltzj
515
39k
Clear Off the Table
cherdarchuk
86
310k
Building Adaptive Systems
keathley
32
1.9k
YesSQL, Process and Tooling at Scale
rocio
165
13k
The MySQL Ecosystem @ GitHub 2015
samlambert
244
12k
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