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
35
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
67
Unleash your Programming Creativity
xgouchet
0
110
Demystifying the Test Pyramid
xgouchet
1
360
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
63
Property Based Testing in Practice
xgouchet
0
55
Develop your CI tools
xgouchet
2
360
How to write a safe and reliable Open Source Library
xgouchet
1
230
Benchmarking your app's performance
xgouchet
0
180
Benchmarking your app's performance
xgouchet
0
86
Other Decks in Programming
See All in Programming
Haze - Real time background blurring
chrisbanes
1
520
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
130
快速入門可觀測性
blueswen
0
410
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
350
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
260
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
300
ドメインイベント増えすぎ問題
h0r15h0
2
430
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
990
useSyncExternalStoreを使いまくる
ssssota
6
1.4k
テストコード書いてみませんか?
onopon
2
210
Recoilを剥がしている話
kirik
5
7.2k
Featured
See All Featured
A better future with KSS
kneath
238
17k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
BBQ
matthewcrist
85
9.4k
Adopting Sorbet at Scale
ufuk
73
9.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Six Lessons from altMBA
skipperchong
27
3.5k
YesSQL, Process and Tooling at Scale
rocio
170
14k
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