prog8/parser/build.gradle

47 lines
904 B
Groovy
Raw Normal View History

plugins {
id 'antlr'
id 'java'
}
repositories {
mavenCentral()
}
2019-08-11 20:56:54 +00:00
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.7.2'
compile 'org.antlr:antlr4-runtime:4.7.2'
// antlr('org.antlr:antlr4:4.7.2') {
// exclude group: 'com.ibm.icu', module: 'icu4j'
// }
}
compileJava {
dependsOn tasks.withType(AntlrTask)
}
generateGrammarSource {
outputDirectory = file("src/prog8/parser")
arguments += ["-no-listener","-no-visitor"]
}
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
}
}