Skip to content

Instantly share code, notes, and snippets.

@nwillc
Last active July 8, 2018 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nwillc/3d67518e674a134645993ee0b64f3693 to your computer and use it in GitHub Desktop.
Save nwillc/3d67518e674a134645993ee0b64f3693 to your computer and use it in GitHub Desktop.
buildscript {
ext {
springBootVersion = spring_boot_version
kotlin_version = kotlin_version
}
repositories {
jcenter()
maven { url "https://kotlin.bintray.com/kotlinx" }
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:$spring_boot_version",
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version",
"org.jetbrains.kotlin:kotlin-allopen:$kotlin_version",
"org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:$serialization_version"
}
}
apply plugin: 'kotlin'
apply plugin: "kotlin-spring"
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'kotlinx-serialization'
sourceCompatibility = jvm_version
version = '1.2.0'
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = jvm_version
}
}
kotlin { experimental { coroutines 'enable' } }
compileTestKotlin {
kotlinOptions.jvmTarget = jvm_version
}
repositories {
jcenter()
maven { url "https://kotlin.bintray.com/kotlinx" }
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-web',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8',
'org.jetbrains.kotlin:kotlin-reflect',
"org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serialization_version",
"com.fasterxml.jackson.module:jackson-module-kotlin"
testCompile 'org.springframework.boot:spring-boot-starter-test',
"org.junit.jupiter:junit-jupiter-engine:$jupiter_version",
"org.junit.platform:junit-platform-runner:$junit_platform_version",
"org.assertj:assertj-core:$assertj_version"
}
test {
useJUnitPlatform()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment