4
4
5
5
@file:Suppress(" UnstableApiUsage" )
6
6
7
- import me.champeau.gradle .*
7
+ import me.champeau.jmh .*
8
8
import org.jetbrains.kotlin.gradle.tasks.*
9
9
10
10
plugins {
11
11
id(" com.github.johnrengelman.shadow" )
12
- id(" me.champeau.gradle. jmh" ) apply false
12
+ id(" me.champeau.jmh" )
13
13
}
14
14
15
15
repositories {
@@ -21,33 +21,19 @@ java {
21
21
targetCompatibility = JavaVersion .VERSION_1_8
22
22
}
23
23
24
- apply (plugin= " me.champeau.gradle.jmh" )
25
-
26
24
tasks.named<KotlinCompile >(" compileJmhKotlin" ) {
27
25
kotlinOptions {
28
26
jvmTarget = " 1.8"
29
27
freeCompilerArgs + = " -Xjvm-default=enable"
30
28
}
31
29
}
32
30
33
- // It is better to use the following to run benchmarks, otherwise you may get unexpected errors:
34
- // ./gradlew --no-daemon cleanJmhJar jmh -Pjmh="MyBenchmark"
35
- extensions.configure<JMHPluginExtension >(" jmh" ) {
36
- jmhVersion = " 1.26"
37
- duplicateClassesStrategy = DuplicatesStrategy .INCLUDE
38
- failOnError = true
39
- resultFormat = " CSV"
40
- project.findProperty(" jmh" )?.also {
41
- include = listOf (" .*$it .*" )
42
- }
43
- // includeTests = false
44
- }
45
-
46
31
val jmhJarTask = tasks.named<Jar >(" jmhJar" ) {
47
32
archiveBaseName by " benchmarks"
48
33
archiveClassifier by null
49
34
archiveVersion by null
50
- destinationDirectory.file(" $rootDir " )
35
+ archiveVersion.convention(null as String? )
36
+ destinationDirectory.set(file(" $rootDir " ))
51
37
}
52
38
53
39
tasks {
@@ -63,7 +49,7 @@ tasks {
63
49
}
64
50
65
51
dependencies {
66
- implementation(" org.openjdk.jmh:jmh-core:1.26 " )
52
+ implementation(" org.openjdk.jmh:jmh-core:1.35 " )
67
53
implementation(" io.projectreactor:reactor-core:${version(" reactor" )} " )
68
54
implementation(" io.reactivex.rxjava2:rxjava:2.1.9" )
69
55
implementation(" com.github.akarnokd:rxjava2-extensions:0.20.8" )
0 commit comments