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
38
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
81
Unleash your Programming Creativity
xgouchet
0
120
Demystifying the Test Pyramid
xgouchet
1
410
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
73
Property Based Testing in Practice
xgouchet
0
57
Develop your CI tools
xgouchet
2
380
How to write a safe and reliable Open Source Library
xgouchet
1
240
Benchmarking your app's performance
xgouchet
0
190
Benchmarking your app's performance
xgouchet
0
92
Other Decks in Programming
See All in Programming
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
310
ML.NETで始める機械学習
ymd65536
0
240
Bedrock Agentsレスポンス解析によるAgentのOps
licux
3
930
PEPCは何を変えようとしていたのか
ken7253
3
290
CloudNativePGを布教したい
nnaka2992
0
120
TCAを用いたAmebaのリアーキテクチャ
dazy
0
210
JAWS Days 2025のインフラ
komakichi
1
120
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
7
4.2k
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.6k
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
160
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
41
16k
ソフトウェアエンジニアの成長
masuda220
PRO
12
2.1k
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
GraphQLとの向き合い方2022年版
quramy
44
14k
A Modern Web Designer's Workflow
chriscoyier
693
190k
4 Signs Your Business is Dying
shpigford
183
22k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Bash Introduction
62gerente
611
210k
Visualization
eitanlees
146
15k
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