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
44
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
240
Libérez votre créativité
xgouchet
PRO
0
100
Unleash your Programming Creativity
xgouchet
PRO
0
160
Demystifying the Test Pyramid
xgouchet
PRO
1
490
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
95
Property Based Testing in Practice
xgouchet
PRO
0
70
Develop your CI tools
xgouchet
PRO
2
400
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
270
Benchmarking your app's performance
xgouchet
PRO
0
220
Other Decks in Programming
See All in Programming
Javaに鉄道指向プログラミング (Railway Oriented Pro gramming) のエッセンスを取り入れる/Bringing the Essence of Railway-Oriented Programming to Java
cocet33000
1
470
単体テストの始め方/作り方
toms74209200
0
350
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
2
420
Passkeys for Java Developers
ynojima
2
760
#QiitaBash TDDでAIに設計イメージを伝える
ryosukedtomita
2
1.6k
テスト分析入門/Test Analysis Tutorial
goyoki
13
2.8k
ドメインモデリングにおける抽象の役割、tagless-finalによるDSL構築、そして型安全な最適化
knih
1
150
Interface vs Types ~型推論が過多推論~
hirokiomote
1
240
生成AIで日々のエラー調査を進めたい
yuyaabo
0
140
Step up the performance game with Spring Boot and Project Leyden
mhalbritter
0
160
無関心の谷
kanayannet
0
120
GoのWebAssembly活用パターン紹介
syumai
2
910
Featured
See All Featured
Facilitating Awesome Meetings
lara
54
6.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Rails Girls Zürich Keynote
gr2m
94
13k
Being A Developer After 40
akosma
90
590k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
Building Applications with DynamoDB
mza
95
6.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
25
2.8k
Navigating Team Friction
lara
186
15k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
860
4 Signs Your Business is Dying
shpigford
183
22k
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