- Notifications
You must be signed in to change notification settings - Fork 41.6k
Description
Using Spring Boot 3.0.5 with Gradle 7.6.1 and Kotlin DSL for Gradle build files, it seems impossible to use includeProjectDependencies()
in bootJar > layered > dependencies
configuration.
Here is a sample project to showcase the issue: https://github.com/olivier-lemerdy-kry/custom-layer-kotlin-dsl
According to Spring Boot Gradle plugin documentation on Custom Layers configuration,
The intoLayer closure claims content using nested include and exclude calls. The application closure uses Ant-style path matching for include/exclude parameters. The dependencies section uses group:artifact[:version] patterns. It also provides includeProjectDependencies() and excludeProjectDependencies() methods that can be used to include or exclude project dependencies.
However, when you try to use it in this repository build.gradle.kts
file, you get the following error
build.gradle.kts:28:17: Unresolved reference: includeProjectDependencies
Looking at the source code of the Spring Boot Gradle plugin, it seems that the includeProjectDependencies() is present in the provided examples for Groovy build.gradle and absent in provided examples for Kotlin DSL build.gradle.kts.
Would it be possible to support this property in Kotlin DSL as well as it is now the new standard for Gradle? Thanks!