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
61
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
18
Crafting Custom Lint Rules: Elevating Android Code Quality
kibet
0
67
Mastering GitHub Actions: Automate and Supercharge Your Development Workflow
kibet
0
72
Build Configurations: types, variants and flavors.
kibet
0
58
Opportunities in Tech
kibet
0
79
Introduction To Android Development
kibet
0
47
Other Decks in Programming
See All in Programming
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
920
明日から始めるリファクタリング
ryounasso
0
110
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
130
開発者への寄付をアプリ内課金として実装する時の気の使いどころ
ski
0
350
GitHub Actions × AWS OIDC連携の仕組みと経緯を理解する
ota1022
0
240
CSC509 Lecture 06
javiergs
PRO
0
240
そのpreloadは必要?見過ごされたpreloadが技術的負債として爆発した日
mugitti9
2
3k
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
170
ネイティブ製ガントチャートUIを作って学ぶUICollectionViewLayoutの威力
jrsaruo
0
130
詳しくない分野でのVibe Codingで困ったことと学び/vibe-coding-in-unfamiliar-area
shibayu36
3
4.4k
止められない医療アプリ、そっと Swift 6 へ
medley
1
120
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
450
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How to Ace a Technical Interview
jacobian
280
23k
We Have a Design System, Now What?
morganepeng
53
7.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
The Straight Up "How To Draw Better" Workshop
denniskardys
237
140k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.7k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
The World Runs on Bad Software
bkeepers
PRO
71
11k
Rails Girls Zürich Keynote
gr2m
95
14k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
32
2.2k
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!