-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle.kts
40 lines (31 loc) · 1.27 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
import org.jetbrains.kotlin.k2.blogpost.DownloadGradleProfileTask
import org.jetbrains.kotlin.k2.blogpost.PerformanceTask
plugins {
id("org.jetbrains.kotlin.jvm") version "1.9.24"
`kotlin-dsl`
}
repositories {
mavenCentral()
}
val downloadGradleProfileTask = DownloadGradleProfileTask.registerTask(project)
val cleanGeneratedReports_2_0 = tasks.register<Delete>("cleanGeneratedReports2_0") {
delete(layout.projectDirectory.dir("reports/2.0.0"))
}
val benchmark_2_0 = PerformanceTask.registerPerformanceTask(project, "benchmark_2_0", "2.0.0") {
gradleProfilerDir.set(downloadGradleProfileTask.flatMap { it.gradleProfilerDir })
dependsOn(cleanGeneratedReports_2_0)
dependsOn(downloadGradleProfileTask)
}
val cleanGeneratedReports_1_9 = tasks.register<Delete>("cleanGeneratedReports1_9") {
delete(layout.projectDirectory.dir("reports/1.9.24"))
}
val benchmark_1_9 = PerformanceTask.registerPerformanceTask(project, "benchmark_1_9", "1.9.24") {
gradleProfilerDir.set(downloadGradleProfileTask.flatMap { it.gradleProfilerDir })
dependsOn(cleanGeneratedReports_1_9)
dependsOn(downloadGradleProfileTask)
}
tasks.register("runBenchmarks") {
group = "benchmarks"
description = "Run all benchmarks"
dependsOn(benchmark_2_0, benchmark_1_9)
}