-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
53 lines (46 loc) · 1.26 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
plugins {
java
kotlin("jvm") version "1.5.10"
antlr
application
}
group = "club.code"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
antlr("org.antlr:antlr4:4.9.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}
tasks.getByName<Test>("test") {
useJUnitPlatform()
}
tasks.register("runFirstKotlin") {
application.mainClass.set("FirstKt")
dependsOn("generateGrammarSource")
dependsOn("run")
}
tasks.register("runSecondKotlin") {
application.mainClass.set("SecondKt")
dependsOn("generateGrammarSource")
dependsOn("run")
}
tasks.register("runFirstJava") {
application.mainClass.set("First")
dependsOn("generateGrammarSource")
dependsOn("run")
}
tasks.register("runSecondJava") {
application.mainClass.set("Second")
dependsOn("generateGrammarSource")
dependsOn("run")
}
tasks.generateGrammarSource {
maxHeapSize = "64m"
arguments = arguments + listOf("-visitor", "-long-messages", "-package", "interpreter")
outputDirectory = File("$buildDir/generated-src/antlr/main/interpreter/")
}