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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
58
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
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
470
Codex の「自走力」を高める
yorifuji
0
280
株式会社 Sun terras カンパニーデック
sunterras
0
2k
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
200
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
160
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
230
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
210
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
130
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.4k
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
230
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
160
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
250
Building Flexible Design Systems
yeseniaperezcruz
330
40k
From π to Pie charts
rasagy
0
140
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Accessibility Awareness
sabderemane
0
73
ラッコキーワード サービス紹介資料
rakko
1
2.5M
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
310
Mind Mapping
helmedeiros
PRO
1
110
SEO for Brand Visibility & Recognition
aleyda
0
4.3k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
GraphQLとの向き合い方2022年版
quramy
50
14k
The SEO Collaboration Effect
kristinabergwall1
0
380
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