generated from kotlin-hands-on/advent-of-code-kotlin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
69 lines (56 loc) · 1.43 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import kotlinx.benchmark.gradle.JvmBenchmarkTarget
import kotlinx.benchmark.gradle.benchmark
import org.jetbrains.kotlin.allopen.gradle.AllOpenExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
kotlin("jvm") version "1.9.21"
kotlin("plugin.allopen") version "1.9.21"
id("org.jetbrains.kotlinx.benchmark") version "0.4.6"
}
repositories {
mavenCentral()
}
allOpen {
annotation("org.openjdk.jmh.annotations.State")
}
tasks {
sourceSets {
main {
java.setSrcDirs(listOf("src", "benchmarks"))
kotlin.setSrcDirs(listOf("src", "benchmarks"))
}
}
wrapper {
gradleVersion = "8.5"
}
}
dependencies {
implementation("com.squareup.retrofit2:retrofit:2.9.0)")
implementation("com.squareup.retrofit2:converter-scalars:2.9.0")
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.6")
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime-jvm:0.4.6")
}
configure<AllOpenExtension> {
annotation("org.openjdk.jmh.annotations.State")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
}
}
benchmark {
configurations {
named("main") {
iterationTime = 5
iterationTimeUnit = "sec"
}
}
targets {
register("main")
{
this as JvmBenchmarkTarget
jmhVersion = "1.36"//"1.21"
}
}
}