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
31
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
5
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
73
Introduction To Android Development
kibet
0
41
Other Decks in Programming
See All in Programming
動作確認やテストで漏れがちな観点3選
starfish719
6
1k
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
340
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
120
Immutable ActiveRecord
megane42
0
140
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.2k
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
120
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
110
GoとPHPのインターフェイスの違い
shimabox
2
190
Writing documentation can be fun with plugin system
okuramasafumi
0
120
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.3k
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
SwiftUI Viewの責務分離
elmetal
PRO
1
240
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
244
12k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
How to train your dragon (web standard)
notwaldorf
91
5.8k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.3k
Automating Front-end Workflow
addyosmani
1368
200k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Code Reviewing Like a Champion
maltzj
521
39k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
240
Side Projects
sachag
452
42k
Optimising Largest Contentful Paint
csswizardry
34
3.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!