xiaohongshu
xiaohongshu
android-gradle
Automate Gradle tasks for Android projects - build, test, coverage, clean. Use when building APKs, running unit tests, generating coverage reports, or checking dependencies.
Full skill instructions
Automate Gradle tasks for Android projects: build, test, coverage, clean.
| Command | Description | Gradle Task |
|---|---|---|
build | Build debug APK | ./gradlew assembleDebug |
build:release | Build release APK | ./gradlew assembleRelease |
install | Install to device | ./gradlew installDebug |
clean | Clean build cache | ./gradlew clean |
rebuild | Clean + build | ./gradlew clean assembleDebug |
| Command | Description | Gradle Task |
|---|---|---|
test | Run all unit tests | ./gradlew testDebugUnitTest |
test:class | Run single class | ./gradlew test --tests "*.ClassName" |
test:method | Run single test | ./gradlew test --tests "*.Class.method" |
| Command | Description | Gradle Task |
|---|---|---|
coverage | Full coverage report | ./gradlew jacocoTestDebugUnitTestReport |
coverage:verify | Enforce 80% minimum | ./gradlew jacocoVerification |
| Command | Description | Gradle Task |
|---|---|---|
deps | Show dependency tree | ./gradlew dependencies |
deps:app | App module only | ./gradlew :app:dependencies |
outdated | Check outdated deps | ./gradlew dependencyUpdates |
# Build and install debug APK
./gradlew assembleDebug && ./gradlew installDebug
# Run specific test class
./gradlew test --tests "*.GameManagerImplTest"
# Generate coverage report
./gradlew jacocoTestDebugUnitTestReport
# Report at: app/build/reports/jacoco/jacocoTestDebugUnitTestReport/html/index.html
# Clean rebuild
./gradlew clean assembleDebug
| Task Type | Timeout |
|---|---|
| assembleDebug | 2 min |
| testDebugUnitTest | 3 min |
| jacocoTestDebugUnitTestReport | 2 min |
| clean | 30 sec |
| dependencies | 30 sec |
| Gradle | AGP | Kotlin | JDK |
|---|---|---|---|
| 8.10+ | 8.8+ | 2.1+ | 17+ |
| 8.5+ | 8.5+ | 2.0+ | 17+ |
| 8.0+ | 8.0+ | 1.9+ | 17+ |
// Handle build failures in scripts
fun handleGradleResult(exitCode: Int, output: String) {
when {
exitCode != 0 && output.contains("Compilation failed") ->
println("Fix compilation errors in: ${extractErrorFiles(output)}")
exitCode != 0 && output.contains("AAPT") ->
println("Resource error - check XML files")
exitCode != 0 && output.contains("OutOfMemoryError") ->
println("Increase heap: org.gradle.jvmargs=-Xmx4g")
}
}
Common Errors:
--info for stack tracesapp/build/reports/jacoco/*/html/index.htmlgradle.properties# Run tests and validate results
./gradlew testDebugUnitTest && echo "✓ All tests passed" || echo "✗ Tests failed"
# Check coverage threshold
./gradlew jacocoTestDebugUnitTestReport
# Verify: app/build/reports/jacoco/jacocoTestDebugUnitTestReport/html/index.html
# Target: 80%+ line coverage
# Parse test results programmatically
cat app/build/test-results/testDebugUnitTest/*.xml | grep -E "(tests=|failures=)"
| Issue | Solution |
|---|---|
| Build hangs | Kill daemon: ./gradlew --stop |
| Cache issues | Clean: ./gradlew clean cleanBuildCache |
| OOM errors | Add to gradle.properties: org.gradle.jvmargs=-Xmx4g |
| Version conflict | Force resolution in build.gradle.kts |
| Slow builds | Enable: org.gradle.parallel=true |
# Full CI workflow
./gradlew clean testDebugUnitTest jacocoTestDebugUnitTestReport assembleDebug
# Quick iteration
./gradlew assembleDebug -x lint -x test && ./gradlew installDebug
# Pre-commit check
./gradlew ktlintCheck testDebugUnitTest
# GitHub Actions example
- name: Build & Test
run: |
./gradlew testDebugUnitTest
./gradlew jacocoTestDebugUnitTestReport
./gradlew assembleDebug
- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
files: app/build/reports/jacoco/*/jacoco*.xml
./gradlew), never system Gradle--parallel for multi-module projects-x lint if not needed for quick iterationsxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience