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
28
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
51
Unleash your Programming Creativity
xgouchet
0
73
Demystifying the Test Pyramid
xgouchet
1
280
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
51
Property Based Testing in Practice
xgouchet
0
47
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
170
Benchmarking your app's performance
xgouchet
0
77
Other Decks in Programming
See All in Programming
Google's Recipe for Scaling (Web) Security – LocoMocoSec 2024
lweichselbaum
0
170
CSC307 Lecture 09
javiergs
PRO
1
500
「2024年版 Kotlin サーバーサイドプログラミング実践開発」の補講 〜O/Rマッパー編〜
n_takehata
2
260
Webエディタライブラリ 「CodeMirror」から学ぶ Webアプリ開発のテクニック
ryosukeigarashi
0
250
DMMプラットフォームにおけるTiDBの導入から運用まで
pospome
7
3k
CSC307 Lecture 10
javiergs
PRO
0
310
Jetpack for KMP
fornewid
1
290
iOSアプリでクリップボードにコピーしたことをユーザーに伝えるちょうど良いフィードバックを探す
ski
0
100
Rust.Nagoya #1
codemountains
0
170
How to use Macrobenchmark
veronikapj
0
160
企業向け生成AIアプリの 開発から得られた知見
takaakikakei
0
310
最近追加した型の紹介とその振り返り
aki19035vc
0
180
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
662
120k
The Cult of Friendly URLs
andyhume
75
5.9k
Web Components: a chance to create the future
zenorocha
307
41k
A Tale of Four Properties
chriscoyier
155
22k
Faster Mobile Websites
deanohume
303
30k
The Cost Of JavaScript in 2023
addyosmani
31
4.7k
How to Ace a Technical Interview
jacobian
274
23k
Become a Pro
speakerdeck
PRO
15
4.8k
Unsuck your backbone
ammeep
666
57k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
277
13k
How To Stay Up To Date on Web Technology
chriscoyier
784
250k
Fireside Chat
paigeccino
25
2.8k
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