$30 off During Our Annual Pro Sale. View Details »
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
52
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
69
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
28
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
50
Other Decks in Programming
See All in Programming
認証・認可の基本を学ぼう後編
kouyuume
0
180
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
200
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
110
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
350
AIコーディングエージェント(skywork)
kondai24
0
150
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.2k
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
6.9k
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.2k
ID管理機能開発の裏側 高速にSaaS連携を実現したチームのAI活用編
atzzcokek
0
210
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
230
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.4k
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
140
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
6.7k
Building Applications with DynamoDB
mza
96
6.8k
Speed Design
sergeychernyshev
33
1.4k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Writing Fast Ruby
sferik
630
62k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Navigating Team Friction
lara
191
16k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
RailsConf 2023
tenderlove
30
1.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
700
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!