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
46
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
59
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
16
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
47
Other Decks in Programming
See All in Programming
Navigating Dependency Injection with Metro
zacsweers
3
230
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
430
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
3
1.4k
Kiroで始めるAI-DLC
kaonash
2
580
OSS開発者という働き方
andpad
5
1.7k
個人軟體時代
ethanhuang13
0
320
アルテニア コンサル/ITエンジニア向け 採用ピッチ資料
altenir
0
100
Testing Trophyは叫ばない
toms74209200
0
840
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
260
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
320
Flutter with Dart MCP: All You Need - 박제창 2025 I/O Extended Busan
itsmedreamwalker
0
150
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
210
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Thoughts on Productivity
jonyablonski
70
4.8k
Bash Introduction
62gerente
615
210k
BBQ
matthewcrist
89
9.8k
Raft: Consensus for Rubyists
vanstee
140
7.1k
Gamification - CAS2011
davidbonilla
81
5.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
GitHub's CSS Performance
jonrohan
1032
460k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.6k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
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!