https://github.com/andrei-punko/composite-build-usage-example
Build externalization by put its config into separate repository
https://github.com/andrei-punko/composite-build-usage-example
buildsrc composite-builds gradle gradle-composite gradle-compositebuild spring-boot
Last synced: 12 days ago
JSON representation
Build externalization by put its config into separate repository
- Host: GitHub
- URL: https://github.com/andrei-punko/composite-build-usage-example
- Owner: andrei-punko
- License: mit
- Created: 2021-12-28T10:38:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2026-04-05T15:01:36.000Z (22 days ago)
- Last Synced: 2026-04-05T17:10:09.549Z (22 days ago)
- Topics: buildsrc, composite-builds, gradle, gradle-composite, gradle-compositebuild, spring-boot
- Language: Java
- Homepage:
- Size: 261 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# Composite Build usage example

[](https://github.com/andrei-punko/composite-build-usage-example/actions/workflows/gradle.yml)
Based on [this](https://github.com/andrei-punko/spring-boot-2-template) Spring Boot app template.
Sources was not changed almost, only build script adjusted
## Prerequisites
- JDK 21
- Docker
(Gradle isn't required because of embedded Gradle in the project)
## Conception description
`Composite Build` is externalization of build by put dependencies and plugins into separate Git repository
(which should be added as [Git submodule](.gitmodules) of project)
After that [build script](build.gradle.kts) will looks like this:
```kotlin
import by.andd3dfx.build.*
import by.andd3dfx.build.Plugins.Companion.applyPlugins
service(version = "0.0.1") {
dependencies {
springBoot(project) {
web()
test()
dataJpa()
validation()
// ...
}
lombok()
apacheCommonsLang()
mapstruct()
springDoc()
swagger()
postgres()
h2()
flywayCore()
testContainers()
postgresTestContainers()
// ...
applyPlugins {
springBoot()
}
}
}
```
## Initialize Git submodule with build configuration:
```
git submodule init
git submodule update
```
## How to build application:
```
./gradlew clean build
```
## How to run application:
```
run-app.bat
```
## Run functional tests:
```
cd func-test
./gradlew clean build
```
Check functional test report [here](func-test/build/spock-reports/index.html)