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
42
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
53
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
9
Crafting Custom Lint Rules: Elevating Android Code Quality
kibet
0
61
Mastering GitHub Actions: Automate and Supercharge Your Development Workflow
kibet
0
69
Build Configurations: types, variants and flavors.
kibet
0
55
Opportunities in Tech
kibet
0
76
Introduction To Android Development
kibet
0
45
Other Decks in Programming
See All in Programming
Golangci-lint v2爆誕: 君たちはどうすべきか
logica0419
1
270
はじめてのPDFKit.pdf
shomakato
0
100
ビカム・ア・コパイロット
ymd65536
1
130
20250429 - CNTUG Meetup #67 / DevOps Taiwan Meetup #69 - Deep Dive into Tetragon: Building Runtime Security and Observability with eBPF
tico88612
0
180
カオスに立ち向かう小規模チームの装備の選択〜フルスタックTSという装備の強み _ 弱み〜/Choosing equipment for a small team facing chaos ~ Strengths and weaknesses of full-stack TS~
bitkey
1
150
generative-ai-use-cases(GenU)の推しポイント ~2025年4月版~
hideg
1
400
AWS Summit Hong Kong 2025: Reinventing Programming - How AI Transforms Our Enterprise Coding Approach
dwchiang
0
140
The New Developer Workflow: How AI Transforms Ideas into Code
danielsogl
0
130
Storybookの情報をMCPサーバー化する
shota_tech
3
1.2k
インプロセスQAにおいて大事にしていること / In-process QA Meetup
medley
0
170
파급효과: From AI to Android Development
l2hyunwoo
0
160
データベースの技術選定を突き詰める ~複数事例から考える最適なデータベースの選び方~
nnaka2992
2
1.7k
Featured
See All Featured
The Language of Interfaces
destraynor
158
25k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
570
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.2k
We Have a Design System, Now What?
morganepeng
52
7.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.2k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
A better future with KSS
kneath
239
17k
A designer walks into a library…
pauljervisheath
205
24k
Building an army of robots
kneath
305
45k
Code Reviewing Like a Champion
maltzj
523
40k
A Modern Web Designer's Workflow
chriscoyier
693
190k
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!