-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
57 lines (44 loc) · 1.09 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
plugins {
id("java")
id("me.champeau.jmh").version("0.7.2")
}
group = "org.example"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation("org.openjdk.jmh:jmh-core:1.37")
implementation("org.openjdk.jmh:jmh-generator-annprocess:1.37")
testImplementation(platform("org.junit:junit-bom:5.10.3"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
tasks.compileJava {
options.compilerArgs.add("--enable-preview")
}
java {
sourceCompatibility = JavaVersion.VERSION_23
targetCompatibility = JavaVersion.VERSION_23
}
tasks.test {
useJUnitPlatform()
}
tasks.create<JavaExec>("run") {
classpath = sourceSets.main.get().runtimeClasspath
mainClass.set("org.example.Main")
jvmArgs("--enable-preview")
}
tasks.compileJmhJava {
options.compilerArgs.add("--enable-preview")
}
tasks.jmhCompileGeneratedClasses {
options.compilerArgs.add("--enable-preview")
}
tasks.jmhRunBytecodeGenerator {
jvmArgs.add("--enable-preview")
}
jmh {
fork = 1
timeOnIteration = "2s"
jvmArgs = listOf("--enable-preview")
}