diff --git a/build.gradle b/build.gradle deleted file mode 100644 index b546560..0000000 --- a/build.gradle +++ /dev/null @@ -1,51 +0,0 @@ -buildscript { - ext { - kotlinVersion = '1.2.51' - springBootVersion = '2.0.3.RELEASE' - } - repositories { - mavenCentral() - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}") - classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}") - } -} - -apply plugin: 'kotlin' -apply plugin: 'kotlin-spring' -apply plugin: 'eclipse' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -group = 'com.example' -version = '1.0.0-SNAPSHOT' -sourceCompatibility = 1.8 -compileKotlin { - kotlinOptions { - freeCompilerArgs = ["-Xjsr305=strict"] - jvmTarget = "1.8" - } -} -compileTestKotlin { - kotlinOptions { - freeCompilerArgs = ["-Xjsr305=strict"] - jvmTarget = "1.8" - } -} - -repositories { - mavenCentral() -} - - -dependencies { - compile('org.springframework.boot:spring-boot-starter-actuator') - compile('org.springframework.boot:spring-boot-starter-web') - compile('org.springframework.boot:spring-boot-starter-security') - compile('com.fasterxml.jackson.module:jackson-module-kotlin') - compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8") - compile("org.jetbrains.kotlin:kotlin-reflect") - testCompile('org.springframework.boot:spring-boot-starter-test') -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..6bc391a --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,47 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +plugins { + id("org.springframework.boot") version "2.2.4.RELEASE" + id("io.spring.dependency-management") version "1.0.9.RELEASE" + kotlin("jvm") version "1.3.61" + kotlin("plugin.spring") version "1.3.61" +} + +group = "com.example" +version = "1.0.0-SNAPSHOT" +java.sourceCompatibility = JavaVersion.VERSION_1_8 + +val developmentOnly by configurations.creating +configurations { + runtimeClasspath { + extendsFrom(developmentOnly) + } +} + +repositories { + mavenCentral() +} + + +dependencies { + implementation("org.springframework.boot:spring-boot-starter-actuator") + implementation("org.springframework.boot:spring-boot-starter-security") + 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") + developmentOnly("org.springframework.boot:spring-boot-devtools") + testImplementation("org.springframework.boot:spring-boot-starter-test") { + exclude(group = "org.junit.vintage", module = "junit-vintage-engine") + } + testImplementation("org.springframework.security:spring-security-test") +} + +tasks.withType { + useJUnitPlatform() +} +tasks.withType { + kotlinOptions { + freeCompilerArgs = listOf("-Xjsr305=strict") + jvmTarget = "1.8" + } +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 664faca..58b1351 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index c5ff126..0000000 --- a/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'ssl-demo' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..df50191 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "ssl-demo" diff --git a/src/test/kotlin/com/example/ssldemo/SslDemoApplicationTests.kt b/src/test/kotlin/com/example/ssldemo/SslDemoApplicationTests.kt index 3227e33..b34ee48 100644 --- a/src/test/kotlin/com/example/ssldemo/SslDemoApplicationTests.kt +++ b/src/test/kotlin/com/example/ssldemo/SslDemoApplicationTests.kt @@ -1,11 +1,8 @@ package com.example.ssldemo -import org.junit.Test -import org.junit.runner.RunWith +import org.junit.jupiter.api.Test import org.springframework.boot.test.context.SpringBootTest -import org.springframework.test.context.junit4.SpringRunner -@RunWith(SpringRunner::class) @SpringBootTest class SslDemoApplicationTests {