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
49
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
67
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
24
Crafting Custom Lint Rules: Elevating Android Code Quality
kibet
0
68
Mastering GitHub Actions: Automate and Supercharge Your Development Workflow
kibet
0
73
Build Configurations: types, variants and flavors.
kibet
0
59
Opportunities in Tech
kibet
0
80
Introduction To Android Development
kibet
0
49
Other Decks in Programming
See All in Programming
Dive into Triton Internals
appleparan
0
490
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
360
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
450
組織もソフトウェアも難しく考えない、もっとシンプルな考え方で設計する #phpconfuk
o0h
PRO
10
4.1k
CloudflareのSandbox SDKを試してみた
syumai
0
140
しっかり学ぶ java.lang.*
nagise
1
270
Module Harmony
petamoriken
1
160
AIの弱点、やっぱりプログラミングは人間が(も)勉強しよう / YAPC AI and Programming
kishida
9
4k
The Missing Link in Angular's Signal Story: Resource API and httpResource
manfredsteyer
PRO
0
110
2026年向け会社紹介資料
misu
0
160
自動テストを活かすためのテスト分析・テスト設計の進め方/JaSST25 Shikoku
goyoki
2
610
乱雑なコードの整理から学ぶ設計の初歩
masuda220
PRO
29
11k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
527
40k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
The Cost Of JavaScript in 2023
addyosmani
55
9.2k
Building Applications with DynamoDB
mza
96
6.7k
Typedesign – Prime Four
hannesfritz
42
2.9k
Rails Girls Zürich Keynote
gr2m
95
14k
Fireside Chat
paigeccino
41
3.7k
Code Review Best Practice
trishagee
72
19k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
11
930
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
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!