kmath/examples/build.gradle.kts

58 lines
1.9 KiB
Plaintext
Raw Normal View History

2019-06-08 16:25:51 +03:00
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
kotlin("jvm")
kotlin("plugin.allopen") version "1.4.20-dev-3898-14"
id("kotlinx.benchmark") version "0.2.0-dev-20"
2019-06-08 16:25:51 +03:00
}
allOpen.annotation("org.openjdk.jmh.annotations.State")
2019-06-08 16:25:51 +03:00
repositories {
2020-09-20 22:39:27 +03:00
maven("https://dl.bintray.com/mipt-npm/kscience")
2020-04-03 22:29:23 +03:00
maven("https://dl.bintray.com/mipt-npm/dev")
maven("https://dl.bintray.com/kotlin/kotlin-dev/")
2019-06-08 16:25:51 +03:00
mavenCentral()
}
sourceSets.register("benchmarks")
2019-06-08 16:25:51 +03:00
dependencies {
// implementation(project(":kmath-ast"))
2019-06-08 16:25:51 +03:00
implementation(project(":kmath-core"))
implementation(project(":kmath-coroutines"))
implementation(project(":kmath-commons"))
2020-05-22 21:28:14 +03:00
implementation(project(":kmath-prob"))
2019-12-08 15:48:25 +03:00
implementation(project(":kmath-viktor"))
2019-12-09 19:52:00 +03:00
implementation(project(":kmath-dimensions"))
implementation(project(":kmath-ejml"))
2020-04-03 22:29:23 +03:00
implementation("org.jetbrains.kotlinx:kotlinx-io-jvm:0.2.0-npm-dev-6")
implementation("org.jetbrains.kotlinx:kotlinx.benchmark.runtime:0.2.0-dev-20")
2020-06-23 20:03:45 +03:00
"benchmarksCompile"(sourceSets.main.get().output + sourceSets.main.get().compileClasspath) //sourceSets.main.output + sourceSets.main.runtimeClasspath
2019-06-08 16:25:51 +03:00
}
// Configure benchmark
benchmark {
// Setup configurations
targets
2019-06-08 16:25:51 +03:00
// This one matches sourceSet name above
.register("benchmarks")
2019-06-08 16:25:51 +03:00
configurations.register("fast") {
warmups = 5 // number of warmup iterations
iterations = 3 // number of iterations
iterationTime = 500 // time in seconds per iteration
iterationTimeUnit = "ms" // time unity for iterationTime, default is seconds
2019-06-08 16:25:51 +03:00
}
}
kotlin.sourceSets.all {
with(languageSettings) {
useExperimentalAnnotation("kotlin.contracts.ExperimentalContracts")
useExperimentalAnnotation("kotlin.ExperimentalUnsignedTypes")
}
}
2019-06-08 16:25:51 +03:00
tasks.withType<KotlinCompile> { kotlinOptions.jvmTarget = "11" }