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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Theophilus Kibet
November 15, 2022
Programming
63
0
Share
Gradle Dive: Writing Custom Plugins
Theophilus Kibet
November 15, 2022
More Decks by Theophilus Kibet
See All by Theophilus Kibet
From Source to Bytecode: Understanding the Kotlin Compilation Process
kibet
0
85
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
43
Crafting Custom Lint Rules: Elevating Android Code Quality
kibet
0
86
Mastering GitHub Actions: Automate and Supercharge Your Development Workflow
kibet
0
80
Build Configurations: types, variants and flavors.
kibet
0
71
Opportunities in Tech
kibet
0
90
Introduction To Android Development
kibet
0
59
Other Decks in Programming
See All in Programming
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
120
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
620
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
290
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
150
CSC307 Lecture 17
javiergs
PRO
0
240
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
250
色即是空、空即是色、データサイエンス
kamoneggi
1
200
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.1k
RTSPクライアントを自作してみた話
simotin13
0
210
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
2.2k
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
300
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
2
390
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
40k
Are puppies a ranking factor?
jonoalderson
1
3.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
380
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Technical Leadership for Architectural Decision Making
baasie
3
380
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
200
Ethics towards AI in product and experience design
skipperchong
2
290
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
420
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Git: the NoSQL Database
bkeepers
PRO
432
67k
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!