Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A build.gradle.kts
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
kotlin("jvm") version "1.3.61"
kotlin("kapt") version "1.3.61"
}
version = "0.1-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
testCompile("org.junit.jupiter:junit-jupiter-api:5.4.2")
testCompile("org.junit.jupiter:junit-jupiter-params:5.4.2")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.4.2")
compile("org.apache.commons:commons-math3:3.6.1")
compile("org.jetbrains.kotlin:kotlin-reflect:1.3.61")
compile(kotlin("stdlib-jdk8"))
}
sourceSets {
main {
java {
srcDir("src/main")
}
}
test {
java {
srcDir("src/test")
}
}
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "1.8"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "1.8"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.