summaryrefslogtreecommitdiff
path: root/buildSrc
diff options
context:
space:
mode:
Diffstat (limited to 'buildSrc')
-rw-r--r--buildSrc/build.gradle.kts2
-rw-r--r--buildSrc/src/main/kotlin/benchmark-conventions.gradle.kts38
2 files changed, 6 insertions, 34 deletions
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index a5e99bfa..4eb8ac31 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -34,7 +34,7 @@ dependencies {
implementation(kotlin("gradle-plugin", version = "1.5.30"))
implementation("org.jlleitschuh.gradle:ktlint-gradle:10.1.0")
implementation("org.jetbrains.kotlin:kotlin-allopen:1.5.30")
- implementation("org.jetbrains.kotlinx:kotlinx-benchmark-plugin:0.3.1")
+ implementation("me.champeau.jmh:jmh-gradle-plugin:0.6.6")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.5.0")
implementation("gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0")
}
diff --git a/buildSrc/src/main/kotlin/benchmark-conventions.gradle.kts b/buildSrc/src/main/kotlin/benchmark-conventions.gradle.kts
index 590f51cf..65608e8f 100644
--- a/buildSrc/src/main/kotlin/benchmark-conventions.gradle.kts
+++ b/buildSrc/src/main/kotlin/benchmark-conventions.gradle.kts
@@ -20,49 +20,21 @@
* SOFTWARE.
*/
-import kotlinx.benchmark.gradle.*
import org.jetbrains.kotlin.allopen.gradle.*
plugins {
- id("org.jetbrains.kotlinx.benchmark")
`java-library`
kotlin("plugin.allopen")
-}
-
-sourceSets {
- register("jmh") {
- compileClasspath += sourceSets["main"].output
- runtimeClasspath += sourceSets["main"].output
- }
-}
-
-configurations {
- named("jmhImplementation") {
- extendsFrom(configurations["implementation"])
- }
+ id("me.champeau.jmh")
}
configure<AllOpenExtension> {
annotation("org.openjdk.jmh.annotations.State")
}
-benchmark {
- targets {
- register("jmh") {
- this as JvmBenchmarkTarget
- jmhVersion = "1.33"
- }
- }
-}
-
-dependencies {
- val libs = Libs(project)
- implementation(libs["kotlinx.benchmark.runtime.jvm"])
-}
+jmh {
+ jmhVersion.set("1.33")
-// Workaround for https://github.com/Kotlin/kotlinx-benchmark/issues/39
-afterEvaluate {
- tasks.named<org.gradle.jvm.tasks.Jar>("jmhBenchmarkJar") {
- duplicatesStrategy = DuplicatesStrategy.EXCLUDE
- }
+ profilers.add("stack")
+ profilers.add("gc")
}