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
45
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
57
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
15
Crafting Custom Lint Rules: Elevating Android Code Quality
kibet
0
65
Mastering GitHub Actions: Automate and Supercharge Your Development Workflow
kibet
0
70
Build Configurations: types, variants and flavors.
kibet
0
56
Opportunities in Tech
kibet
0
78
Introduction To Android Development
kibet
0
47
Other Decks in Programming
See All in Programming
Quand Symfony, ApiPlatform, OpenAI et LangChain s'allient pour exploiter vos PDF : de la théorie à la production…
ahmedbhs123
0
220
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
1
470
脱Riverpod?fqueryで考える、TanStack Queryライクなアーキテクチャの可能性
ostk0069
0
500
What's new in AppKit on macOS 26
1024jp
0
150
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
360
ご注文の差分はこちらですか? 〜 AWS CDK のいろいろな差分検出と安全なデプロイ
konokenj
3
580
Goで作る、開発・CI環境
sin392
0
260
Hack Claude Code with Claude Code
choplin
7
2.5k
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
180
生成AI時代のコンポーネントライブラリの作り方
touyou
1
290
ふつうの技術スタックでアート作品を作ってみる
akira888
1
1.3k
ソフトウェア品質を数字で捉える技術。事業成長を支えるシステム品質の マネジメント
takuya542
2
15k
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
The Cult of Friendly URLs
andyhume
79
6.5k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.7k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
For a Future-Friendly Web
brad_frost
179
9.8k
The Pragmatic Product Professional
lauravandoore
35
6.7k
It's Worth the Effort
3n
185
28k
The Invisible Side of Design
smashingmag
301
51k
Visualization
eitanlees
146
16k
Automating Front-end Workflow
addyosmani
1370
200k
Agile that works and the tools we love
rasmusluckow
329
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!