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
39
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
31
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
5
Crafting Custom Lint Rules: Elevating Android Code Quality
kibet
0
58
Mastering GitHub Actions: Automate and Supercharge Your Development Workflow
kibet
0
66
Build Configurations: types, variants and flavors.
kibet
0
53
Opportunities in Tech
kibet
0
73
Introduction To Android Development
kibet
0
41
Other Decks in Programming
See All in Programming
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
120
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
160
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
120
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
130
Conform を推す - Advocating for Conform
mizoguchicoji
3
690
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
6
4k
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
790
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
600
Spring gRPC について / About Spring gRPC
mackey0225
0
220
Domain-Driven Transformation
hschwentner
2
1.9k
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
Documentation Writing (for coders)
carmenintech
67
4.6k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
240
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.8k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Typedesign – Prime Four
hannesfritz
40
2.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
Music & Morning Musume
bryan
46
6.3k
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!