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
77
Unleash your Programming Creativity
xgouchet
0
120
Demystifying the Test Pyramid
xgouchet
1
400
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
71
Property Based Testing in Practice
xgouchet
0
57
Develop your CI tools
xgouchet
2
370
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
91
Other Decks in Programming
See All in Programming
WebDriver BiDiとは何なのか
yotahada3
1
140
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
250
Amazon ECS とマイクロサービスから考えるシステム構成
hiyanger
2
570
Introduction to kotlinx.rpc
arawn
0
700
Domain-Driven Transformation
hschwentner
2
1.9k
Writing documentation can be fun with plugin system
okuramasafumi
0
120
Spring gRPC について / About Spring gRPC
mackey0225
0
220
Rubyで始める関数型ドメインモデリング
shogo_tksk
0
120
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
130
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
ARA Ansible for the teams
kksat
0
150
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
6
4k
Featured
See All Featured
How GitHub (no longer) Works
holman
314
140k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Testing 201, or: Great Expectations
jmmastey
42
7.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Adopting Sorbet at Scale
ufuk
74
9.2k
Typedesign – Prime Four
hannesfritz
40
2.5k
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
KATA
mclloyd
29
14k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.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