2019-01-29 11:08:21 +00:00
|
|
|
plugins {
|
|
|
|
id 'antlr'
|
|
|
|
id 'java'
|
|
|
|
}
|
|
|
|
|
2021-10-30 10:01:52 +00:00
|
|
|
java {
|
|
|
|
toolchain {
|
|
|
|
languageVersion = JavaLanguageVersion.of(javaVersion)
|
|
|
|
}
|
2019-01-29 11:08:21 +00:00
|
|
|
}
|
|
|
|
|
2019-07-09 05:24:43 +00:00
|
|
|
dependencies {
|
2023-09-14 19:11:55 +00:00
|
|
|
antlr 'org.antlr:antlr4:4.13.1'
|
|
|
|
implementation 'org.antlr:antlr4-runtime:4.13.1'
|
2021-06-13 16:10:07 +00:00
|
|
|
}
|
2019-07-09 05:24:43 +00:00
|
|
|
|
2021-06-13 16:10:07 +00:00
|
|
|
configurations.all {
|
|
|
|
exclude group: 'com.ibm.icu', module: 'icu4j'
|
2019-07-09 05:24:43 +00:00
|
|
|
}
|
|
|
|
|
2021-06-13 16:10:07 +00:00
|
|
|
|
2019-01-29 11:08:21 +00:00
|
|
|
compileJava {
|
|
|
|
dependsOn tasks.withType(AntlrTask)
|
|
|
|
}
|
|
|
|
|
|
|
|
generateGrammarSource {
|
|
|
|
outputDirectory = file("src/prog8/parser")
|
2020-03-10 20:47:15 +00:00
|
|
|
arguments += ["-no-listener","-no-visitor"]
|
2019-01-29 11:08:21 +00:00
|
|
|
}
|
2019-01-29 11:09:39 +00:00
|
|
|
|
2023-09-08 19:29:49 +00:00
|
|
|
|
2019-01-29 11:09:18 +00:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
2023-09-08 19:29:49 +00:00
|
|
|
srcDir "${project.projectDir}/src"
|
2019-01-29 11:09:18 +00:00
|
|
|
}
|
2019-01-29 11:09:39 +00:00
|
|
|
antlr {
|
2023-09-08 19:29:49 +00:00
|
|
|
srcDirs = ["${project.projectDir}/antlr"]
|
2019-01-29 11:09:39 +00:00
|
|
|
}
|
2019-01-29 11:09:18 +00:00
|
|
|
}
|
2019-03-02 21:41:21 +00:00
|
|
|
}
|