• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 
5 @file:Suppress("UnstableApiUsage")
6 
7 import me.champeau.jmh.*
8 import org.jetbrains.kotlin.gradle.tasks.*
9 
<lambda>null10 plugins {
11     id("com.github.johnrengelman.shadow")
12     id("me.champeau.jmh")
13 }
14 
<lambda>null15 repositories {
16     maven("https://repo.typesafe.com/typesafe/releases/")
17 }
18 
<lambda>null19 java {
20     sourceCompatibility = JavaVersion.VERSION_1_8
21     targetCompatibility = JavaVersion.VERSION_1_8
22 }
23 
<lambda>null24 tasks.named<KotlinCompile>("compileJmhKotlin") {
25     kotlinOptions {
26         jvmTarget = "1.8"
27         freeCompilerArgs += "-Xjvm-default=all"
28     }
29 }
30 
<lambda>null31 val jmhJarTask = tasks.named<Jar>("jmhJar") {
32     archiveBaseName by "benchmarks"
33     archiveClassifier by null
34     archiveVersion by null
35     archiveVersion.convention(null as String?)
36     destinationDirectory.set(file("$rootDir"))
37 }
38 
<lambda>null39 tasks {
40     // For some reason the DuplicatesStrategy from jmh is not enough
41     // and errors with duplicates appear unless I force it to WARN only:
42     withType<Copy> {
43         duplicatesStrategy = DuplicatesStrategy.WARN
44     }
45 
46     build {
47         dependsOn(jmhJarTask)
48     }
49 }
50 
<lambda>null51 dependencies {
52     implementation("org.openjdk.jmh:jmh-core:1.35")
53     implementation("io.projectreactor:reactor-core:${version("reactor")}")
54     implementation("io.reactivex.rxjava2:rxjava:2.1.9")
55     implementation("com.github.akarnokd:rxjava2-extensions:0.20.8")
56 
57     implementation("com.typesafe.akka:akka-actor_2.12:2.5.0")
58     implementation(project(":kotlinx-coroutines-core"))
59     implementation(project(":kotlinx-coroutines-debug"))
60     implementation(project(":kotlinx-coroutines-reactive"))
61 
62     // add jmh dependency on main
63     "jmhImplementation"(sourceSets.main.get().runtimeClasspath)
64 }
65