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
26
Rock the Gradle, Rule the World
Xavier Gouchet
April 01, 2019
Tweet
Share
More Decks by Xavier Gouchet
See All by Xavier Gouchet
Unleash your Programming Creativity
xgouchet
0
46
Demystifying the Test Pyramid
xgouchet
1
250
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
49
Property Based Testing in Practice
xgouchet
0
44
Develop your CI tools
xgouchet
2
350
How to write a safe and reliable Open Source Library
xgouchet
1
220
Benchmarking your app's performance
xgouchet
0
160
Benchmarking your app's performance
xgouchet
0
76
It's time to up your test game
xgouchet
1
110
Other Decks in Programming
See All in Programming
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
330
AppRouter Panel Talk
yosuke_furukawa
PRO
1
530
勉強会4_アップデートされたAssistantsAPIを試す
milky04
0
110
酒飲んでたらテックリードになった話
spbaya0141
0
210
Timeline エディター拡張入門
yucchiy
0
460
Long journey of Ruby standard library RubyKaigi 2024
andpad
2
260
Namespace, What and Why
tagomoris
3
720
Using "modern" Ruby to build a better, faster Homebrew
mikemcquaid
2
290
slog登場に伴うloggerの取り回し手法の見直し / kamakura.go #6
arthur1
0
160
mb_trim関数を作りました
youkidearitai
PRO
1
240
戦略的DDDは重いのか? / Is strategic DDD heavy?
pictiny
3
2.1k
一文字エイリアスのすすめ
fujimura
0
200
Featured
See All Featured
RailsConf 2023
tenderlove
9
590
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Statistics for Hackers
jakevdp
790
220k
Navigating Team Friction
lara
179
13k
Being A Developer After 40
akosma
67
580k
Thoughts on Productivity
jonyablonski
60
3.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
What's in a price? How to price your products and services
michaelherold
238
11k
Building Your Own Lightsaber
phodgson
100
5.7k
The Cult of Friendly URLs
andyhume
74
5.7k
Clear Off the Table
cherdarchuk
86
310k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
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