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
55
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
72
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
35
Crafting Custom Lint Rules: Elevating Android Code Quality
kibet
0
72
Mastering GitHub Actions: Automate and Supercharge Your Development Workflow
kibet
0
74
Build Configurations: types, variants and flavors.
kibet
0
62
Opportunities in Tech
kibet
0
82
Introduction To Android Development
kibet
0
51
Other Decks in Programming
See All in Programming
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
730
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
AI巻き込み型コードレビューのススメ
nealle
1
270
MUSUBIXとは
nahisaho
0
130
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
130
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
990
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
170
Making the Leap to Tech Lead
cromwellryan
135
9.7k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
99
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
110
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
220
A Tale of Four Properties
chriscoyier
162
24k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
430
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The SEO Collaboration Effect
kristinabergwall1
0
350
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!