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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Theophilus Kibet
November 15, 2022
Programming
64
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
88
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
46
Crafting Custom Lint Rules: Elevating Android Code Quality
kibet
0
92
Mastering GitHub Actions: Automate and Supercharge Your Development Workflow
kibet
0
83
Build Configurations: types, variants and flavors.
kibet
0
73
Opportunities in Tech
kibet
0
91
Introduction To Android Development
kibet
0
60
Other Decks in Programming
See All in Programming
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
330
dRuby over BLE
makicamel
2
330
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
2
620
net-httpのHTTP/2対応について
naruse
0
480
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
120
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
270
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
220
The NotImplementedError Problem in Ruby
koic
1
740
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
100
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.4k
RTSPクライアントを自作してみた話
simotin13
0
600
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
110
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
250
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
470
Building an army of robots
kneath
306
46k
YesSQL, Process and Tooling at Scale
rocio
174
15k
We Are The Robots
honzajavorek
0
250
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Technical Leadership for Architectural Decision Making
baasie
3
400
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Test your architecture with Archunit
thirion
1
2.3k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
570
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!