Skip to content

Commit

Permalink
Add support for building a Spring Boot WebMVC jar with dependencies a…
Browse files Browse the repository at this point in the history
…nd frontend js code
  • Loading branch information
DanielScholzde committed Feb 26, 2024
1 parent 6faec70 commit e9f3eb8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpack
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension
import org.springframework.boot.gradle.tasks.bundling.BootJar
import org.springframework.boot.gradle.tasks.run.BootRun
import java.util.*
import java.util.Properties
import javax.inject.Inject


Expand Down Expand Up @@ -602,6 +602,9 @@ abstract class KVisionPlugin @Inject constructor(
get() = named("jsMain")

private fun getServerType(project: Project): KVServerType? {
if (project.configurations["jvmMainImplementation"].dependencies.any { it.name == "spring-boot-starter-web" }) {
return KVServerType.SPRINGBOOT
}
val kvisionServerDependency = project.configurations["commonMainApi"].dependencies.map {
it.name
}.firstOrNull { it.startsWith("kvision-server-") }
Expand Down

0 comments on commit e9f3eb8

Please sign in to comment.