| name | gradle-multimodule |
| description | Build, test, or manage the Gradle multi-module monorepo. Use when building, testing, or debugging build issues across backend, frontend, or analytics. |
| allowed-tools | Bash, Read, Grep |
Gradle Multi-Module Build (Kotlin DSL)
Module Structure
This monorepo uses Gradle Kotlin DSL with these modules:
:backend- Spring Boot/Java REST API (port 8080)- Frontend and Analytics are separate (npm/pip)
Common Commands
cd /workspaces/claudeplus
# Backend builds
./gradlew backend:build # Compile and test
./gradlew backend:bootRun # Start dev server
./gradlew backend:bootJar # Production JAR
./gradlew backend:test # Run tests only
./gradlew backend:clean # Clean build artifacts
# Full project
./gradlew build # Build all modules
./gradlew clean build # Clean rebuild
Key Build Files
/settings.gradle.kts- Defines included modules/build.gradle.kts- Root config, plugin versions/backend/build.gradle.kts- Backend dependencies
Dependencies (backend/build.gradle.kts)
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
runtimeOnly("com.h2database:h2")
implementation("com.theokanning.openai-gpt3-java:service:0.18.2")
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
testImplementation("org.springframework.boot:spring-boot-starter-test")
}
Troubleshooting
Build Fails
- Run
./gradlew cleanfirst - Check Java version: requires Java 21
- Verify Lombok annotation processor is configured
Tests Fail
- Check H2 database configuration
- Verify test resources in
src/test/resources - Run single test:
./gradlew backend:test --tests "*TestClassName*"
Dependency Issues
- Run
./gradlew backend:dependenciesto see tree - Check for version conflicts in Spring BOM