Incrementally fixes Gradle build and compilation errors for Android and Kotlin Multiplatform projects by detecting issues, applying minimal fixes, verifying with re-builds, and summarizing results.
npx claudepluginhub jevonthompsonx/jsquared_blog# Gradle Build Fix Incrementally fix Gradle build and compilation errors for Android and Kotlin Multiplatform projects. ## Step 1: Detect Build Configuration Identify the project type and run the appropriate build: | Indicator | Build Command | |-----------|---------------| | `build.gradle.kts` + `composeApp/` (KMP) | `./gradlew composeApp:compileKotlinMetadata 2>&1` | | `build.gradle.kts` + `app/` (Android) | `./gradlew app:compileDebugKotlin 2>&1` | | `settings.gradle.kts` with modules | `./gradlew assemble 2>&1` | | Detekt configured | `./gradlew detekt 2>&1` | Also check `gradle.pr...
/gradle-buildIncrementally fixes Gradle build and compilation errors for Android and Kotlin Multiplatform projects by detecting issues, applying minimal fixes, verifying with re-builds, and summarizing results.
/gradle-buildIncrementally fixes Gradle build and compilation errors for Android and Kotlin Multiplatform projects. Detects type, parses errors, applies minimal fixes, verifies, and summarizes results.
/kmp-dependency-fixFixes Kotlin Multiplatform dependency conflicts, version mismatches, and Gradle issues by analyzing the dependency tree and applying minimal changes.
/build-fixIncrementally fixes build and type errors with minimal safe changes by detecting build system, fixing one error at a time, verifying fixes, and summarizing results.
/build-fixAutomatically analyzes and fixes build errors (syntax, type, dependencies, config). Runs tests/builds for verification, retries up to 3x, and reports results with changes or recommendations.
/SKILLRuns Gradle wrapper tasks (e.g., test, lint, assemble) from android/ subdirectory for Android validation and builds. Saves long output to scratch/. Use as building block for broader workflows.
Share bugs, ideas, or general feedback.
Incrementally fix Gradle build and compilation errors for Android and Kotlin Multiplatform projects.
Identify the project type and run the appropriate build:
| Indicator | Build Command |
|---|---|
build.gradle.kts + composeApp/ (KMP) | ./gradlew composeApp:compileKotlinMetadata 2>&1 |
build.gradle.kts + app/ (Android) | ./gradlew app:compileDebugKotlin 2>&1 |
settings.gradle.kts with modules | ./gradlew assemble 2>&1 |
| Detekt configured | ./gradlew detekt 2>&1 |
Also check gradle.properties and local.properties for configuration.
For each error:
build.gradle.ktsStop and ask the user if:
Report:
| Error | Fix |
|---|---|
Unresolved reference in commonMain | Check if the dependency is in commonMain.dependencies {} |
| Expect declaration without actual | Add actual implementation in each platform source set |
| Compose compiler version mismatch | Align Kotlin and Compose compiler versions in libs.versions.toml |
| Duplicate class | Check for conflicting dependencies with ./gradlew dependencies |
| KSP error | Run ./gradlew kspCommonMainKotlinMetadata to regenerate |
| Configuration cache issue | Check for non-serializable task inputs |