android-di-and-build

Configures Hilt dependency injection, Gradle KTS builds, and Android CI/CD pipelines.

Updated Jun 13, 2026
One-click install
npx skills add https://github.com/22Teikk/22Teikk-Agent-Skills-Hub --skill android-di-and-build-22teikk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: android-di-and-build
Source: https://github.com/22Teikk/22Teikk-Agent-Skills-Hub/tree/main/packs/android/skills/android-di-and-build
Command: npx skills add https://github.com/22Teikk/22Teikk-Agent-Skills-Hub --skill android-di-and-build-22teikk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up Android dependency injection, build scripts, and CI/CD involves scattered configuration across Gradle files, version catalogs, and workflow YAML, where mistakes cause version drift, injection failures, and leaked signing credentials. ## Core Features & Use Cases - Hilt Dependency Injection: Standard patterns for @HiltAndroidApp, @AndroidEntryPoint, @HiltViewModel, and scoped modules with @InstallIn. - Centralized Dependency Management: All libraries and plugins defined in gradle/libs.versions.toml and consumed via type-safe accessors in build.gradle.kts. - CI/CD Automation: GitHub Actions workflows for lint, test, and APK builds, plus Firebase App Distribution for release delivery. - Use Case: When adding Retrofit to an Android app, define it once in the Version Catalog, wire it through a Hilt module with proper scoping, and let the CI workflow verify the build on every push. ## Quick Start Set up Hilt dependency injection with a Version Catalog and a GitHub Actions build workflow for my Android project.

Frequently Asked Questions about android-di-and-build

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Hilt dependency injection in an Android project?▼

Annotate the Application class with @HiltAndroidApp, Activities and Fragments with @AndroidEntryPoint, and ViewModels with @HiltViewModel plus @Inject constructor. Define providers in modules annotated with @Module and @InstallIn scoped to components like SingletonComponent.

How to add dependencies using Gradle Version Catalog?▼

Define versions, libraries, and plugins in gradle/libs.versions.toml, then reference them in build.gradle.kts via type-safe accessors like libs.hilt.android. This centralizes version management and prevents drift across modules.

Should I use kapt or ksp for Hilt annotation processing?▼

Use kapt for mixed Java/Kotlin projects and ksp for pure-Kotlin projects, since ksp offers faster incremental builds. Hilt 2.52 and later supports KSP; avoid applying both processors to the same library.

Why does Hilt fail with missing @AndroidEntryPoint errors?▼

Injection fails when an Activity or Fragment attempts field injection without the @AndroidEntryPoint annotation. Add the annotation to every Android entry point that receives injected dependencies.

Can I commit signing credentials in build.gradle.kts?▼

No. Keystore passwords and aliases must be loaded dynamically from local.properties or environment variables, never hardcoded in signingConfigs. Committing local.properties or .keystore files to git exposes release credentials.