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
35
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
6
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
74
Introduction To Android Development
kibet
0
41
Other Decks in Programming
See All in Programming
Datadog Workflow Automation で圧倒的価値提供
showwin
1
310
読まないコードリーディング術
hisaju
0
120
Kotlinの開発でも AIをいい感じに使いたい / Making the Most of AI in Kotlin Development
kohii00
5
1.9k
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
160
Expoによるアプリ開発の現在地とReact Server Componentsが切り開く未来
yukukotani
2
220
変化の激しい時代における、こだわりのないエンジニアの強さ
satoshi256kbyte
0
110
Ça bouge du côté des animations CSS !
goetter
2
160
Jasprが凄い話
hyshu
0
180
color-scheme: light dark; を完全に理解する
uhyo
7
510
Amazon Bedrockマルチエージェントコラボレーションを諦めてLangGraphに入門してみた
akihisaikeda
1
160
Lambdaの監視、できてますか?Datadogを用いてLambdaを見守ろう
nealle
2
760
Google Cloudとo11yで実現するアプリケーション開発者主体のDB改善
nnaka2992
1
110
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Embracing the Ebb and Flow
colly
84
4.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Building an army of robots
kneath
303
45k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
13
1k
Practical Orchestrator
shlominoach
186
10k
Scaling GitHub
holman
459
140k
How STYLIGHT went responsive
nonsquared
99
5.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
380
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Agile that works and the tools we love
rasmusluckow
328
21k
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!