https://github.com/mrclrchtr/gradle-kotlin-spring
Multi-Project/Module example with Gradle, Kotlin and Spring with Kotlin DSL
https://github.com/mrclrchtr/gradle-kotlin-spring
build buildsrc gradle gradle-build gradle-buildsrc gradle-kotlin-dsl gradle-multi-project gradle-wrapper gradlew kotlin kotlin-dsl spring-boot springboot tutorial
Last synced: 5 months ago
JSON representation
Multi-Project/Module example with Gradle, Kotlin and Spring with Kotlin DSL
- Host: GitHub
- URL: https://github.com/mrclrchtr/gradle-kotlin-spring
- Owner: mrclrchtr
- License: mit
- Created: 2019-01-15T09:59:41.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2026-01-01T20:42:40.000Z (5 months ago)
- Last Synced: 2026-01-03T08:40:15.545Z (5 months ago)
- Topics: build, buildsrc, gradle, gradle-build, gradle-buildsrc, gradle-kotlin-dsl, gradle-multi-project, gradle-wrapper, gradlew, kotlin, kotlin-dsl, spring-boot, springboot, tutorial
- Language: Kotlin
- Homepage: https://mrclrchtr.de/gradle-5-mit-kotlin-dsl-in-multi-project-build/
- Size: 724 KB
- Stars: 148
- Watchers: 3
- Forks: 30
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Gradle, Kotlin, Spring Skeleton
[](https://github.com/mrclrchtr/gradle-kotlin-spring/actions/workflows/gradle-build-pr.yml)
Do you already know how to set up a Gradle multi-project / multi-module with Kotlin DSL and Spring Dependency
Management?
I have set up an example here, in which I have abstracted the most important logical components and packed them into
individual buildSrc modules. This makes the build very modular and also very clear. What do you think?
It has the following details:
- Java `21`
- Gradle `8.4`
- buildSrc
- Kotlin DSL
- Version Catalog (libs.versions.toml)
- Kotlin `2.2.0`
- Spring Boot `3.5.9`
- Detekt `1.23.8`
- Dokka `2.0.0`
- Spring Dependency-Management
Additionally, I added a POC how Maven Publishing could work. In another project, I got it to work like this without
Spring boot on Gitlab. Unfortunately, it doesn't work with the spring boot plugin in this example yet. But I think it can
help others to reach their goals.
If there are any questions or suggestions for improvement, issues, discussions and PRs are welcome.
## Run it!
The factory:
```shell
./gradlew :message-factory:bootRun
```
The Dashboard:
```shell
./gradlew :message-dashboard:bootRun
```
And now visit
You can enter every name in place of "Mr.Bean".
# GitHub Actions
If you want to use the action, you have to set a GRADLE_ENCRYPTION_KEY as secret in your repository:
https://docs.gradle.org/8.6/userguide/configuration_cache.html#config_cache:secrets:configuring_encryption_key