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 {
|
plugins {
|
||||||
kotlin("jvm") version "1.9.25"
|
kotlin("jvm") version "1.9.25"
|
||||||
kotlin("plugin.spring") 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"
|
id("io.spring.dependency-management") version "1.1.7"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,18 +25,23 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
|
apply(plugin = "java")
|
||||||
|
apply(plugin = "org.jetbrains.kotlin.jvm")
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(platform("org.springframework.boot:spring-boot-dependencies:${Versions.springBoot}"))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencyManagement {
|
||||||
implementation("org.springframework.boot:spring-boot-starter-web")
|
imports {
|
||||||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
mavenBom("org.springframework.boot:spring-boot-dependencies:${Versions.springBoot}")
|
||||||
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")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
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 getAll(): List<Product>
|
||||||
|
|
||||||
fun save(product: Product)
|
fun save(product: Product)
|
||||||
|
|
||||||
|
fun deleteById(id: UUID)
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("org.springframework.boot")
|
id("org.springframework.boot") version "3.4.3"
|
||||||
id("io.spring.dependency-management")
|
id("io.spring.dependency-management") version "1.1.7"
|
||||||
id("java")
|
id("java")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11,5 +11,5 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
springBoot {
|
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
|
import org.springframework.boot.runApplication
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
class DemoApplication
|
open class DemoApplication
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
runApplication<DemoApplication>(*args)
|
runApplication<DemoApplication>(*args)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
rootProject.name = "demo"
|
rootProject.name = "demo"
|
||||||
include(":demo-domain")
|
include(":demo-domain")
|
||||||
|
include(":demo-application")
|
||||||
include(":demo-launcher")
|
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