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 F. Gouchet
PRO
April 01, 2019
Programming
0
42
Rock the Gradle, Rule the World
Xavier F. Gouchet
PRO
April 01, 2019
Tweet
Share
More Decks by Xavier F. Gouchet
See All by Xavier F. Gouchet
Being an ethical software engineer
xgouchet
PRO
0
200
Libérez votre créativité
xgouchet
PRO
0
92
Unleash your Programming Creativity
xgouchet
PRO
0
140
Demystifying the Test Pyramid
xgouchet
PRO
1
450
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
82
Property Based Testing in Practice
xgouchet
PRO
0
63
Develop your CI tools
xgouchet
PRO
2
380
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
250
Benchmarking your app's performance
xgouchet
PRO
0
200
Other Decks in Programming
See All in Programming
Youtube Lofier - Chrome拡張開発
ninikoko
0
2.4k
フロントエンドテストの育て方
quramy
11
2.9k
SQL Server ベクトル検索
odashinsuke
0
160
ベクトル検索システムの気持ち
monochromegane
31
9.8k
PHP で学ぶ OAuth 入門
azuki
1
110
エンジニア未経験が最短で戦力になるためのTips
gokana
0
260
リストビュー画面UX改善の振り返り
splcywolf
0
120
Building Scalable Mobile Projects: Fast Builds, High Reusability and Clear Ownership
cyrilmottier
2
240
PHPのガベージコレクションを深掘りしよう
rinchoku
0
260
海外のアプリで見かけたかっこいいTransitionを真似てみる
shogotakasaki
1
160
新しいPHP拡張モジュールインストール方法「PHP Installer for Extensions (PIE)」を使ってみよう!
cocoeyes02
0
290
Kamal 2 – Get Out of the Cloud
aleksandrov
1
170
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
69
4.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Product Roadmaps are Hard
iamctodd
PRO
52
11k
Being A Developer After 40
akosma
90
590k
Navigating Team Friction
lara
184
15k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Why Our Code Smells
bkeepers
PRO
336
57k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
RailsConf 2023
tenderlove
29
1.1k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
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