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
210
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
260
Benchmarking your app's performance
xgouchet
PRO
0
200
Other Decks in Programming
See All in Programming
ベクトル検索システムの気持ち
monochromegane
31
9.9k
Going Structural with Named Tuples
bishabosha
0
200
remix + cloudflare workers (DO) docker上でいい感じに開発する
yoshidatomoaki
0
130
Java 24まとめ / Java 24 summary
kishida
3
460
サービスレベルを管理してアジャイルを加速しよう!! / slm-accelerate-agility
tomoyakitaura
1
170
マルチアカウント環境での、そこまでがんばらない RI/SP 運用設計
wa6sn
0
710
自分のために作ったアプリが、グローバルに使われるまで / Indie App Development Lunch LT
pixyzehn
1
150
MCP調べてみました! / Exploring MCP
uhzz
2
2.2k
英語 × の私が、生成AIの力を借りて、OSSに初コントリビュートした話
personabb
0
180
プロダクト横断分析に役立つ、事前集計しないサマリーテーブル設計
hanon52_
2
390
地域ITコミュニティの活性化とAWSに移行してみた話
yuukis
0
230
AWS で実現する安全な AI エージェントの作り方 〜 Bedrock Engineer の実装例を添えて 〜 / how-to-build-secure-ai-agents
gawa
8
710
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
660
StorybookのUI Testing Handbookを読んだ
zakiyama
29
5.6k
Scaling GitHub
holman
459
140k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Fireside Chat
paigeccino
37
3.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
30k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Agile that works and the tools we love
rasmusluckow
328
21k
Java REST API Framework Comparison - PWX 2021
mraible
30
8.5k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
34
2.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