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
63
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
AkarengaLT vol.38
hashimoto_kei
1
110
Go言語はstack overflowの夢を見るか?
logica0419
0
510
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1.1k
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
250
CSC509 Lecture 05
javiergs
PRO
0
310
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
1
120
CSC305 Lecture 08
javiergs
PRO
0
270
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
380
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
7k
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
33k
CSC509 Lecture 06
javiergs
PRO
0
260
3年ぶりにコードを書いた元CTOが Claude Codeと30分でMVPを作った話
maikokojima
0
610
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
920
Statistics for Hackers
jakevdp
799
220k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
Visualization
eitanlees
149
16k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
880
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!