build.gradle.kts 1.2 KB
Newer Older
2
2293736867 已提交
1 2 3
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
4 5 6 7
    id("org.springframework.boot") version "2.4.3"
    id("io.spring.dependency-management") version "1.0.11.RELEASE"
    kotlin("jvm") version "1.4.30"
    kotlin("plugin.spring") version "1.4.30"
2
2293736867 已提交
8 9 10
}

group = "com.example"
11
version = "0.0.1-SNAPSHOT"
2
2293736867 已提交
12 13
java.sourceCompatibility = JavaVersion.VERSION_11

14 15 16 17 18 19
configurations {
    compileOnly {
        extendsFrom(configurations.annotationProcessor.get())
    }
}

2
2293736867 已提交
20 21 22 23 24 25 26 27 28
repositories {
    mavenCentral()
}

dependencies {
    implementation("org.springframework.boot:spring-boot-starter-web")
    implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
    implementation("org.jetbrains.kotlin:kotlin-reflect")
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
29 30 31
    developmentOnly("org.springframework.boot:spring-boot-devtools")
    annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
    testImplementation("org.springframework.boot:spring-boot-starter-test")
2
2293736867 已提交
32 33 34 35 36 37 38 39
}

tasks.withType<KotlinCompile> {
    kotlinOptions {
        freeCompilerArgs = listOf("-Xjsr305=strict")
        jvmTarget = "11"
    }
}
40 41 42 43

tasks.withType<Test> {
    useJUnitPlatform()
}