Fix dependency management.
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
object Versions {
|
||||
const val springBoot = "3.4.3"
|
||||
const val springDependencyManagement = "1.1.7"
|
||||
const val kotlinJvm = "1.9.25"
|
||||
const val kotlinPluginSpring = "1.9.25"
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.9.25"
|
||||
kotlin("plugin.spring") version "1.9.25"
|
||||
id("org.springframework.boot") version "3.4.4"
|
||||
id("io.spring.dependency-management") version "1.1.7"
|
||||
}
|
||||
|
||||
@@ -19,18 +25,23 @@ repositories {
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply(plugin = "java")
|
||||
apply(plugin = "org.jetbrains.kotlin.jvm")
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(platform("org.springframework.boot:spring-boot-dependencies:${Versions.springBoot}"))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.springframework.boot:spring-boot-starter-web")
|
||||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom("org.springframework.boot:spring-boot-dependencies:${Versions.springBoot}")
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
||||
11
demo-application/build.gradle.kts
Normal file
11
demo-application/build.gradle.kts
Normal file
@@ -0,0 +1,11 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("io.spring.dependency-management") version "1.1.7"
|
||||
id("java")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib"))
|
||||
implementation(project(":demo-domain"))
|
||||
implementation("org.springframework:spring-context")
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.example.demo.application.product
|
||||
|
||||
import org.springframework.stereotype.Service
|
||||
|
||||
@Service
|
||||
class ProductUseCases {
|
||||
|
||||
}
|
||||
@@ -9,4 +9,6 @@ interface ProductPort {
|
||||
fun getAll(): List<Product>
|
||||
|
||||
fun save(product: Product)
|
||||
|
||||
fun deleteById(id: UUID)
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("org.springframework.boot")
|
||||
id("io.spring.dependency-management")
|
||||
id("org.springframework.boot") version "3.4.3"
|
||||
id("io.spring.dependency-management") version "1.1.7"
|
||||
id("java")
|
||||
}
|
||||
|
||||
@@ -11,5 +11,5 @@ dependencies {
|
||||
}
|
||||
|
||||
springBoot {
|
||||
mainClass = "com.example.demo.launcher.ApplicationLauncher"
|
||||
mainClass = "com.example.demo.launcher.ApplicationLauncherKt"
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
|
||||
@SpringBootApplication
|
||||
class DemoApplication
|
||||
open class DemoApplication
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
runApplication<DemoApplication>(*args)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
rootProject.name = "demo"
|
||||
include(":demo-domain")
|
||||
include(":demo-application")
|
||||
include(":demo-launcher")
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
package com.example.demo
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
|
||||
@SpringBootApplication
|
||||
class DemoApplication
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
runApplication<DemoApplication>(*args)
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
spring.application.name=demo
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.example.demo
|
||||
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
|
||||
@SpringBootTest
|
||||
class DemoApplicationTests {
|
||||
|
||||
@Test
|
||||
fun contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user