Created
September 28, 2019 09:50
-
-
Save roamingthings/a98a4adeba72e5c998e7bb9df23af3af to your computer and use it in GitHub Desktop.
Basic gradle kts script for a Spring Boot 2.1 application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | |
plugins { | |
id("org.springframework.boot") version "2.1.8.RELEASE" | |
id("io.spring.dependency-management") version "1.0.8.RELEASE" | |
kotlin("jvm") version "1.3.50" | |
kotlin("plugin.spring") version "1.3.50" | |
} | |
group = "de.roamingthings" | |
version = "0.0.1-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-data-mongodb") | |
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") | |
testImplementation("de.flapdoodle.embed:de.flapdoodle.embed.mongo") | |
testImplementation("org.junit.jupiter:junit-jupiter") | |
testCompile("org.assertj:assertj-core") | |
testCompile("org.mockito:mockito-core") | |
testCompile("org.mockito:mockito-junit-jupiter") | |
} | |
tasks.withType<KotlinCompile> { | |
kotlinOptions { | |
freeCompilerArgs = listOf("-Xjsr305=strict") | |
jvmTarget = "1.8" | |
} | |
} | |
tasks.test { | |
useJUnitPlatform() | |
testLogging { | |
events("passed", "skipped", "failed") | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assertj.version=3.13.2 | |
junit-jupiter.version=5.5.2 | |
kotlin.version=1.3.50 | |
mockito.version=3.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rootProject.name = "my-fancy-project" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment