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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Xavier F. Gouchet
PRO
April 01, 2019
Programming
0
59
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
Writing a Kotlin Compiler Plugin
xgouchet
PRO
0
59
Being an ethical software engineer
xgouchet
PRO
0
320
Libérez votre créativité
xgouchet
PRO
0
140
Unleash your Programming Creativity
xgouchet
PRO
0
210
Demystifying the Test Pyramid
xgouchet
PRO
1
660
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
130
Property Based Testing in Practice
xgouchet
PRO
0
100
Develop your CI tools
xgouchet
PRO
2
460
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
320
Other Decks in Programming
See All in Programming
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
220
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
610
Ruby x Terminal
a_matsuda
7
590
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
360
株式会社 Sun terras カンパニーデック
sunterras
0
2k
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
510
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
170
CSC307 Lecture 14
javiergs
PRO
0
460
AHC061解説
shun_pi
0
350
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
250
Windows on Ryzen and I
seosoft
0
220
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
380
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
Building Adaptive Systems
keathley
44
2.9k
We Have a Design System, Now What?
morganepeng
55
8k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
53k
RailsConf 2023
tenderlove
30
1.4k
Tell your own story through comics
letsgokoyo
1
830
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Exploring anti-patterns in Rails
aemeredith
2
280
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