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
17
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
3
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
40
Other Decks in Programming
See All in Programming
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
200
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
週次リリースを実現するための グローバルアプリ開発
tera_ny
1
1.2k
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
26
6k
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
1k
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
1.4k
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
1.4k
Azure AI Foundryのご紹介
qt_luigi
1
210
ESLintプラグインを使用してCDKのセオリーを適用する
yamanashi_ren01
2
240
Оптимизируем производительность блока Казначейство
lamodatech
0
960
テストコード書いてみませんか?
onopon
2
340
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
950
Featured
See All Featured
Designing for Performance
lara
604
68k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
How to train your dragon (web standard)
notwaldorf
89
5.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
210
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
Code Reviewing Like a Champion
maltzj
521
39k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Testing 201, or: Great Expectations
jmmastey
41
7.2k
Docker and Python
trallard
43
3.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
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!