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
Gradle Dive: Writing Custom Plugins
Search
Kibet Theophilus
November 15, 2022
Programming
0
36
Gradle Dive: Writing Custom Plugins
Kibet Theophilus
November 15, 2022
Tweet
Share
More Decks by Kibet Theophilus
See All by Kibet Theophilus
Crafting Custom Lint Rules: Elevating Android Code Quality
kibet
0
56
Mastering GitHub Actions: Automate and Supercharge Your Development Workflow
kibet
0
64
Build Configurations: types, variants and flavors.
kibet
0
52
Opportunities in Tech
kibet
0
71
Introduction To Android Development
kibet
0
40
Other Decks in Programming
See All in Programming
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
250
僕がつくった48個のWebサービス達
yusukebe
18
17k
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
430
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
210
macOS でできる リアルタイム動画像処理
biacco42
7
1.9k
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
230
カスタムしながら理解するGraphQL Connection
yanagii
1
1.2k
/←このスケジュール表に立ち向かう フロントエンド開発戦略 / A front-end development strategy to tackle a single-slash schedule.
nrslib
1
590
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
220
Amazon Neptuneで始めてみるグラフDB-OpenSearchによるグラフの全文検索-
satoshi256kbyte
4
330
ECSのサービス間通信 4つの方法を比較する 〜Canary,Blue/Greenも添えて〜
tkikuc
11
2.3k
Nuxtベースの「WXT」でChrome拡張を作成する | Vue Fes 2024 ランチセッション
moshi1121
1
520
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
73
9k
Fireside Chat
paigeccino
32
3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
The Cult of Friendly URLs
andyhume
78
6k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
The Invisible Side of Design
smashingmag
297
50k
Designing for humans not robots
tammielis
249
25k
Happy Clients
brianwarren
97
6.7k
Designing Experiences People Love
moore
138
23k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Transcript
Gradle Dive: Writing Custom Plugins Theophilus Kibet Android Engineer @Kyosk
@_kibetheophilus
:app
:app :feature:profile :feature:cart :feature:products :data:local :data:network :core
26+
- Each module needs a build.gradle.
- Each module needs a build.gradle. - Duplicate scripts in
each module.
- Each module needs a build.gradle. - Duplicate scripts in
each module. - Hard to maintain.
- Each module needs a build.gradle - Duplicate scripts in
each module - Hard to maintain e.g creating a build type
- Declares Gradle plugins. Each build.gradle
- Declares Gradle plugins. - Sets build parameters. Each build.gradle
- Declares Gradle plugins. - Sets build parameters. - Declares
dependencies. Each build.gradle
Gradle Plugin
- packages up reusable pieces of build logic, which can
be used across many different projects and builds. Gradle Plugin
- Script Plugin Types of Plugins
- Script Plugin - Binary Plugin Types of Plugins
- Additional build script Script Plugin
- Additional build script - apply from : “flavors.gradle” Script
Plugin
- Written by implementing plugin interface. Binary Plugin
- Written by implementing plugin interface - Applied using a
unique id Binary Plugin
- Written by implementing plugin interface - Applied using a
unique id - plugins { id(“com.android.library”) } Binary Plugin
- What will the plugin do? Creating a Plugin
- Add gradleApi() and kotlin dependencies Setup
None
- Add gradleApi() and kotlin dependencies - Create a class
implementing Plugin interface Setup
None
None
None
None
None
- Share build logic across modules - Reduced build script
size - Migrate all our files to kts Benefits
Questions?
Thank you!