This repo contains a Gradle project structure with:
- Centralized and maintainable build configuration and custom build logic
- No dependency hell through smart dependency management with dependency rules and analysis
The starter project contains everything for a traditional JVM project. The structure though, is good for any kind of project you may build with Gradle (Kotlin, Groovy, Scala, ...).
You can find a detailed explanation of the project structure in Gradle Basics.
project
βββ gradle
β βββ libs.versions.toml
β βββ wrapper
β βββ gradle-wrapper.jar
β βββ gradle-wrapper.properties
βββ gradlew
βββ gradlew.bat
βββ settings.gradle(.kts)
βββ subproject-a
β βββ build.gradle(.kts)
β βββ src
βββ subproject-b
βββ build.gradle(.kts)
βββ src
The Configuration Cache improves build performance by caching the result of the configuration phase and reusing it for subsequent builds.
Mapping between Java module directives and Gradle configurations to declare dependencies: declaring_module_dependencies
This project includes a Makefile with standardized commands that work across all operating systems:
make help # Show all available commands
make run # Run the main application
make build # Build the entire project
make test # Run all tests
make check # Run all checks (format, lint, tests)| Command | Description |
|---|---|
make run |
Run the main application (app module) |
make build |
Build the entire project |
make build-fast |
Build without tests (faster) |
make test |
Run all tests |
make test-coverage |
Run tests with coverage report |
make format |
Format all code (Spotless) |
make check |
Run all checks (format + lint + tests) |
make clean |
Clean build artifacts |
make deps |
Show project dependencies |
# Quick development cycle
make format build-fast
# Run specific example
make run-java # Run Java example
make run-kotlin # Run Kotlin example
make run-spring # Run Spring example
# Full CI pipeline
make all # clean + build + test + checkYou can also run ./gradlew help to get
Gradle command-line usage help.
./gradlew help # Show Gradle help
./gradlew build # Build project
./gradlew app:run # Run app module
./gradlew test # Run tests
./gradlew check # Run all checksMake the Gradle wrapper executable:
git update-index --chmod=+x gradlew
# Or use make:
make setupThis project is heavily inspired by the following awesome projects.



