prog8/parser/build.gradle
Irmen de Jong e2358de27c ver
2020-03-10 20:39:30 +01:00

50 lines
955 B
Groovy

plugins {
id 'antlr'
id 'java'
}
targetCompatibility = 1.8
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
configurations {
// strange antlr plugin issue, see https://github.com/gradle/gradle/issues/820
// this avoids linking in the complete antlr binary jar
compile {
extendsFrom = extendsFrom.findAll { it != configurations.antlr }
}
}
dependencies {
antlr 'org.antlr:antlr4:4.8'
implementation 'org.antlr:antlr4-runtime:4.8'
// antlr('org.antlr:antlr4:4.8') {
// exclude group: 'com.ibm.icu', module: 'icu4j'
// }
}
compileJava {
dependsOn tasks.withType(AntlrTask)
}
generateGrammarSource {
outputDirectory = file("src/prog8/parser")
arguments += ["-no-listener","-visitor"]
}
sourceSets {
main {
java {
srcDirs = ["${project.projectDir}/src"]
}
antlr {
srcDirs = ["${project.projectDir}/antlr"]
}
}
}