File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed
Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ plugins {
66 plugins.kotlin.jvm
77}
88
9+ description = " Ktor backend application"
10+
911application {
1012 mainClass = " AppKt"
1113 applicationDefaultJvmArgs + =
Original file line number Diff line number Diff line change 11import common.mppTargetName
2+ import kotlinx.benchmark.gradle.BenchmarkTarget
3+ import kotlinx.benchmark.gradle.JvmBenchmarkTarget
24
35plugins {
46 plugins.kotlin.mpp
57 alias(libs.plugins.kotlinx.benchmark)
68 alias(libs.plugins.kotlin.allopen)
79}
810
11+ description = " Kotlin benchmarking tests"
12+
913allOpen { annotation(" org.openjdk.jmh.annotations.State" ) }
1014
1115benchmark {
1216 targets {
13- register(" jvm" )
14- register(" desktop" )
17+ register(" jvm" ) { configureJmh() }
18+ register(" desktop" ) { configureJmh() }
1519 // register("js")
1620 }
1721
@@ -33,3 +37,8 @@ dependencies {
3337 commonMainImplementation(projects.common)
3438 commonMainImplementation(libs.kotlinx.bench.runtime)
3539}
40+
41+ fun BenchmarkTarget.configureJmh () {
42+ this as JvmBenchmarkTarget
43+ jmhVersion = libs.versions.jmh.get()
44+ }
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ application {
2020
2121dependencies {
2222 // Common multiplatform dependencies
23- commonMainImplementation(libs.kotlinx.io.bytestring)
2423 commonMainImplementation(libs.kotlinx.io.core)
2524 commonMainImplementation(libs.ktor.client.core)
2625 commonMainImplementation(libs.ktor.client.logging)
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ publish-scm-url = "https://github.com/sureshg/kotlin-mpp-playgrou
2222
2323# Gradle Dependencies Versions
2424kotlinx-kover = " 0.7.2"
25- kotlinx-io = " 0.2.0 "
25+ kotlinx-io = " 0.2.1 "
2626kotlinx-atomicfu = " 0.21.0"
2727kotlinx-coroutines = " 1.7.2"
2828kotlinx-datetime = " 0.4.0"
@@ -54,6 +54,7 @@ ksp-powerassert = "0.13.0"
5454slf4j = " 2.0.7"
5555logback = " 1.2.6"
5656log4j = " 3.0.0-alpha1"
57+ jmh = " 1.36"
5758ktfmt = " 0.44"
5859google-javaformat = " 1.17.0"
5960google-auto-service = " 1.1.1"
@@ -139,7 +140,6 @@ kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-seri
139140kotlinx-datetime = { module = " org.jetbrains.kotlinx:kotlinx-datetime" , version.ref = " kotlinx-datetime" }
140141kotlinx-atomicfu = { module = " org.jetbrains.kotlinx:atomicfu" , version.ref = " kotlinx-atomicfu" }
141142kotlinx-io-core = { module = " org.jetbrains.kotlinx:kotlinx-io-core" , version.ref = " kotlinx-io" }
142- kotlinx-io-bytestring = { module = " org.jetbrains.kotlinx:kotlinx-io-bytestring" , version.ref = " kotlinx-io" }
143143kotlinx-lincheck = { module = " org.jetbrains.kotlinx:lincheck" , version.ref = " kotlinx-lincheck" }
144144kotlinx-reflect-lite = { module = " org.jetbrains.kotlinx:kotlinx.reflect.lite" , version.ref = " kotlinx-reflect-lite" }
145145kotlinx-collections-immutable = { module = " org.jetbrains.kotlinx:kotlinx-collections-immutable" , version.ref = " kotlinx-collections-immutable" }
You can’t perform that action at this time.
0 commit comments