$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Gradle Dive: Writing Custom Plugins
Search
Theophilus Kibet
November 15, 2022
Programming
0
51
Gradle Dive: Writing Custom Plugins
Theophilus Kibet
November 15, 2022
Tweet
Share
More Decks by Theophilus Kibet
See All by Theophilus Kibet
From Source to Bytecode: Understanding the Kotlin Compilation Process
kibet
0
69
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
27
Crafting Custom Lint Rules: Elevating Android Code Quality
kibet
0
68
Mastering GitHub Actions: Automate and Supercharge Your Development Workflow
kibet
0
73
Build Configurations: types, variants and flavors.
kibet
0
59
Opportunities in Tech
kibet
0
80
Introduction To Android Development
kibet
0
49
Other Decks in Programming
See All in Programming
全員アーキテクトで挑む、 巨大で高密度なドメインの紐解き方
agatan
8
19k
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
320
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
100
NUMA環境とコンテナランタイム ― youki における Linux Memory Policy 実装
n4mlz
1
170
tparseでgo testの出力を見やすくする
utgwkk
1
150
関数の挙動書き換える
takatofukui
4
770
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.4k
[SF Ruby Conf 2025] Rails X
palkan
0
460
CSC305 Lecture 17
javiergs
PRO
0
290
AIコーディングエージェント(skywork)
kondai24
0
130
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
1
930
20 years of Symfony, what's next?
fabpot
2
320
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Automating Front-end Workflow
addyosmani
1371
200k
How to Ace a Technical Interview
jacobian
280
24k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
86
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Music & Morning Musume
bryan
46
7k
The Language of Interfaces
destraynor
162
25k
Raft: Consensus for Rubyists
vanstee
140
7.2k
A designer walks into a library…
pauljervisheath
210
24k
Mobile First: as difficult as doing things right
swwweet
225
10k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
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!