prog8/parser/build.gradle
2022-12-23 17:59:56 +01:00

41 lines
683 B
Groovy

plugins {
id 'antlr'
id 'java'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(javaVersion)
}
}
dependencies {
antlr 'org.antlr:antlr4:4.11.1'
implementation 'org.antlr:antlr4-runtime:4.11.1'
}
configurations.all {
exclude group: 'com.ibm.icu', module: 'icu4j'
}
compileJava {
dependsOn tasks.withType(AntlrTask)
}
generateGrammarSource {
outputDirectory = file("src/prog8/parser")
arguments += ["-no-listener","-no-visitor"]
}
sourceSets {
main {
java {
srcDirs = ["${project.projectDir}/src"]
}
antlr {
srcDirs = ["${project.projectDir}/antlr"]
}
}
}