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
64
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Gradle Dive: Writing Custom Plugins
Theophilus Kibet
November 15, 2022
More Decks by Theophilus Kibet
See All by Theophilus Kibet
From Source to Bytecode: Understanding the Kotlin Compilation Process
kibet
0
87
Building Cross- Platform Applications with Kotlin Multiplatform
kibet
0
45
Crafting Custom Lint Rules: Elevating Android Code Quality
kibet
0
89
Mastering GitHub Actions: Automate and Supercharge Your Development Workflow
kibet
0
82
Build Configurations: types, variants and flavors.
kibet
0
73
Opportunities in Tech
kibet
0
91
Introduction To Android Development
kibet
0
60
Other Decks in Programming
See All in Programming
oxlintはeslint/typescript-eslintを置き換えられるのか
shomafujita
2
320
JavaDoc 再入門
nagise
0
300
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
660
OSもどきOS
arkw
0
460
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
730
AutonomyとControlのあいだ:Graflowで記述するAIエージェント協調
myui
0
110
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
260
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
300
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.2k
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
1.4k
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
0
170
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
240
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
320
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
160
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
580
We Have a Design System, Now What?
morganepeng
55
8.2k
The SEO Collaboration Effect
kristinabergwall1
1
480
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
320
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
820
Building AI with AI
inesmontani
PRO
1
1.1k
The Pragmatic Product Professional
lauravandoore
37
7.3k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
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!