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
Theophilus Kibet
November 15, 2022
Programming
0
45
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
56
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
11
Crafting Custom Lint Rules: Elevating Android Code Quality
kibet
0
65
Mastering GitHub Actions: Automate and Supercharge Your Development Workflow
kibet
0
70
Build Configurations: types, variants and flavors.
kibet
0
56
Opportunities in Tech
kibet
0
78
Introduction To Android Development
kibet
0
46
Other Decks in Programming
See All in Programming
ワイがおすすめする新潟の食 / 20250530phpconf-niigata-eve
kasacchiful
0
300
Bytecode Manipulation 으로 생산성 높이기
bigstark
1
270
コードに語らせよう――自己ドキュメント化が内包する楽しさについて / Let the Code Speak
nrslib
6
1.4k
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfold' relates to 'iterate'"
philipschwarz
PRO
0
190
インターフェース設計のコツとツボ
togishima
2
690
実はすごいスピードで進化しているCSS
hayato_yokoyama
0
110
機械学習って何? 5分で解説頑張ってみる
kuroneko2828
0
200
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
21
5.9k
Practical Tips and Tricks for Working with Compose Multiplatform Previews (mDevCamp 2025)
stewemetal
0
120
無関心の谷
kanayannet
0
160
Create a website using Spatial Web
akkeylab
0
250
カクヨムAndroidアプリのリブート
numeroanddev
0
410
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
245
12k
Making Projects Easy
brettharned
116
6.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
We Have a Design System, Now What?
morganepeng
52
7.6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
106
19k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
43
2.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
6
690
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
180
53k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.8k
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!