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
34
Rock the Gradle, Rule the World
Xavier Gouchet
April 01, 2019
Tweet
Share
More Decks by Xavier Gouchet
See All by Xavier Gouchet
Libérez votre créativité
xgouchet
0
62
Unleash your Programming Creativity
xgouchet
0
98
Demystifying the Test Pyramid
xgouchet
1
340
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
58
Property Based Testing in Practice
xgouchet
0
54
Develop your CI tools
xgouchet
2
360
How to write a safe and reliable Open Source Library
xgouchet
1
230
Benchmarking your app's performance
xgouchet
0
180
Benchmarking your app's performance
xgouchet
0
81
Other Decks in Programming
See All in Programming
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
Amazon Qを使ってIaCを触ろう!
maruto
0
410
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
Realtime API 入門
riofujimon
0
150
RubyLSPのマルチバイト文字対応
notfounds
0
120
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
Remix on Hono on Cloudflare Workers
yusukebe
1
300
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
300
Featured
See All Featured
How to Ace a Technical Interview
jacobian
276
23k
A better future with KSS
kneath
238
17k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
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