Skip to content

Commit

Permalink
Merge pull request #516 from DanielScholzde/feature/Spring_Boot_WebMV…
Browse files Browse the repository at this point in the history
…C_build_jar_support

Add support for Spring Boot Web MVC (for building a fat/uber jar)
  • Loading branch information
rjaros authored Mar 2, 2024
2 parents ae7815e + e9f3eb8 commit 98b1fcc
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 98b1fcc

Please sign in to comment.