-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
49 lines (40 loc) · 880 Bytes
/
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.9.20"
antlr
application
}
group = "org.yeeyu.lau"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
antlr("org.antlr:antlr4:4.13.1")
testImplementation(kotlin("test"))
implementation(kotlin("stdlib-jdk8"))
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "21"
}
tasks.compileKotlin {
dependsOn("generateGrammarSource")
}
tasks.getByName("generateGrammarSource") {
this as AntlrTask
arguments = arguments + listOf("-visitor")
}
application {
mainClass.set("MainKt")
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "21"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "21"
}