-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
58 lines (47 loc) · 1.37 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
plugins{
java
antlr
}
group = "com.github.l-Luna.CyclicCompiler"
version = "0.0.4"
repositories{
mavenCentral()
}
dependencies{
implementation("org.antlr:antlr4-runtime:4.11.1")
implementation("org.ow2.asm:asm:9.4")
implementation("org.jetbrains:annotations:23.1.0")
implementation("org.yaml:snakeyaml:1.33")
antlr("org.antlr:antlr4:4.11.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}
tasks.getByName<Test>("test"){
useJUnitPlatform()
jvmArgs("--enable-preview")
}
tasks.withType<JavaExec>{
jvmArgs("--enable-preview")
}
tasks.withType<JavaCompile>{
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
options.compilerArgs.add("--enable-preview")
}
tasks.withType<Javadoc>{
val jdOptions = options as CoreJavadocOptions
jdOptions.addStringOption("source", JavaVersion.VERSION_17.toString())
jdOptions.addBooleanOption("-enable-preview", true)
}
tasks.withType<Jar>{
manifest {
attributes["Main-Class"] = "cyclic.lang.compiler.CompilerLauncher"
}
configurations["compileClasspath"].forEach { file ->
from(zipTree(file.absoluteFile))
}
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
tasks.generateGrammarSource{
arguments = arguments + listOf("-visitor")
}