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 {
|
2022-03-05 14:23:26 +00:00
|
|
|
antlr 'org.antlr:antlr4:4.9.3'
|
|
|
|
implementation 'org.antlr:antlr4-runtime:4.9.3'
|
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
|
|
|
|
2019-01-29 11:09:18 +00:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
|
|
|
srcDirs = ["${project.projectDir}/src"]
|
|
|
|
}
|
2019-01-29 11:09:39 +00:00
|
|
|
antlr {
|
|
|
|
srcDirs = ["${project.projectDir}/antlr"]
|
|
|
|
}
|
2019-01-29 11:09:18 +00:00
|
|
|
}
|
2019-03-02 21:41:21 +00:00
|
|
|
}
|