Android
v1.3.1Android development validation with Gradle build hooks.
Installation
Install han binary (required for hooks to work):
curl -fsSL https://han.guru/install.sh | bashThen install this plugin:
han plugin install jutsu-androidOverview
Android development validation with Gradle build hooks for Claude Code.
Features
- Automatic build validation: Ensures your Android project compiles after agent changes
- Smart caching: Only builds when Kotlin, Java, XML, or Gradle files have changed
- Debug build: Uses
assembleDebugfor faster builds without signing
Installation
han plugin install jutsu-android
Hooks
build (Stop hook)
Automatically runs when you stop Claude Code to ensure the Android project builds:
- Detects directories containing
build.gradleorbuild.gradle.ktswith Android plugin - Only runs if Kotlin, Java, XML layout, or Gradle configuration files have changed
- Runs
./gradlew assembleDebugfor fast compilation checking - Uses
--no-daemonto avoid lingering processes
Configuration
You can customize the hook behavior in your project's han-config.yml:
jutsu-android:
hooks:
build:
enabled: true
# Override with a specific build variant
# command: "./gradlew assembleRelease --no-daemon -q"
To disable the hook for a specific project:
jutsu-android:
hooks:
build:
enabled: false
Requirements
- Android SDK installed and configured
- Java 17+ (for modern Android projects)
- Gradle wrapper (
gradlew) in project root
Notes
- The hook only runs in directories that have Android Gradle plugin configured
- Build output is limited to the last 30 lines to keep hook output concise
- Uses
--no-daemonto prevent Gradle daemon accumulation during development
Related Plugins
- jutsu-kotlin: Kotlin language skills
- jutsu-java: Java language skills
- jutsu-expo: React Native with Expo
Contributing
See CONTRIBUTING.md for guidelines.
License
MIT License - See LICENSE for details.
Skills
android-architecture
Use when implementing MVVM, clean architecture, dependency injection with Hilt, or structuring Android app layers.
android-jetpack-compose
Use when building Android UIs with Jetpack Compose, managing state with remember/mutableStateOf, or implementing declarative UI patterns.
android-kotlin-coroutines
Use when implementing async operations with Kotlin coroutines, Flow, StateFlow, or managing concurrency in Android apps.
Hooks
Token Usage Notice
Hooks run automatically during Claude Code sessions and their output is sent to the model for processing. This may increase token usage and associated costs. Consider disabling hooks you don't need via han-config.yml.
Stop
Runs when the main Claude Code agent has finished responding. Can verify task completion, check quality gates, or ensure documentation requirements are met before the session ends.
SubagentStop
Runs when a Claude Code subagent (Task tool call) has finished responding. Can validate subagent outputs, enforce quality standards, or trigger additional workflows after delegated tasks complete.