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
April 01, 2019
Programming
69
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rock the Gradle, Rule the World
Xavier F. Gouchet
April 01, 2019
More Decks by Xavier F. Gouchet
See All by Xavier F. Gouchet
Writing a Kotlin Compiler Plugin
xgouchet
0
80
Being an ethical software engineer
xgouchet
0
350
Libérez votre créativité
xgouchet
0
180
Unleash your Programming Creativity
xgouchet
0
230
Demystifying the Test Pyramid
xgouchet
1
760
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
150
Property Based Testing in Practice
xgouchet
0
140
Develop your CI tools
xgouchet
2
510
How to write a safe and reliable Open Source Library
xgouchet
1
360
Other Decks in Programming
See All in Programming
バグを直したら useEffect が消えた
colorful12
3
670
「人を評価する AI」の設計と実装
ryoyanara
0
220
FastAPI の並行処理モデルを完全に理解する
hoto17296
6
2.3k
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.4k
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
350
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
230
My Marp Sample
sinoue0108
0
110
FDEが実現するAI駆動経営の現在地
gonta
2
290
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
270
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
270
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
450
リアルな遅延を測る仕様
kota_yata
1
120
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Deep Space Network (abreviated)
tonyrice
0
260
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
ラッコキーワード サービス紹介資料
rakko
1
4.5M
Claude Code のすすめ
schroneko
67
230k
Chasing Engaging Ingredients in Design
codingconduct
0
280
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
A Soul's Torment
seathinner
6
3.5k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
220
The browser strikes back
jonoalderson
0
1.5k
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