You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
Thanks for the report. I suspect we're missing some type information that prevents Kotlin from knowing that it's dealing with a DependenciesIntoLayerSpec. Right now, that information will only be available at runtime so it only works with Groovy.
Using Spring Boot 3.0.5 with Gradle 7.6.1 and Kotlin DSL for Gradle build files, it seems impossible to use
includeProjectDependencies()
inbootJar > 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,
However, when you try to use it in this repository
build.gradle.kts
file, you get the following errorLooking 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!
The text was updated successfully, but these errors were encountered: