mirror of
https://github.com/irmen/prog8.git
synced 2024-11-20 03:32:05 +00:00
7c0bde7310
downgrade antlr4 one version again to what is used in IntelliJ's antlr plugin, to avoid potential version conflicts
41 lines
683 B
Groovy
41 lines
683 B
Groovy
plugins {
|
|
id 'antlr'
|
|
id 'java'
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(javaVersion)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
antlr 'org.antlr:antlr4:4.12.0'
|
|
implementation 'org.antlr:antlr4-runtime:4.12.0'
|
|
}
|
|
|
|
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"]
|
|
}
|
|
}
|
|
}
|