It would be nice if Spring-boot Gradle plugin could support natively Kotlin/Multiplatform ("org.jetbrains.kotlin.multiplatform") Gradle plugin:
- Kotlin 2.1.20 is prohibiting Gradle java
, java-library
and application
plugins in combination with Kotlin multiplatform plugin if a project is using Gradle 8.7+. With previous Gradle versions such combination produces a warning. (issue)
- For application
plugin replacement new experimental API similar to the Gradle one was added (issue)
- Kotlin multiplatform plugin for a several releases already by default always applies java-base
Gradle plugin
Spring boot plugin currently expects that Gradle java
plugin is present in the project to do the main configuration
The possible ways to solve it - either to react on java-base
plugin or create a special plugin action for "org.jetbrains.kotlin.multiplatform" plugin.
Comment From: wilkinsona
either to react on
java-base
plugin
As I understand it, the base plugin only sets up conventions, it doesn't actually create anything itself. Spring Boot's plugin relies on several things that are created by the java
plugin such as the main
source set and various configurations so I don't think reacting to the java-base
plugin would meet our needs.
create a special plugin action for "org.jetbrains.kotlin.multiplatform" plugin
I think this is what we'll have to do. There may be some common logic that we can extract from our existing JavaPluginAction
but I think the entry point will have to be reacting to org.jetbrains.kotlin.multiplatform
.