prog8/parser/build.gradle

54 lines
1017 B
Groovy
Raw Normal View History

plugins {
id 'antlr'
id 'java'
}
targetCompatibility = 11
sourceCompatibility = 11
2019-08-26 19:27:45 +00:00
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 {
2020-12-21 18:19:04 +00:00
antlr 'org.antlr:antlr4:4.9'
implementation 'org.antlr:antlr4-runtime:4.9'
2020-12-21 18:19:04 +00:00
// antlr('org.antlr:antlr4:4.9') {
// exclude group: 'com.ibm.icu', module: 'icu4j'
// }
}
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: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
}
}
2020-08-17 22:47:23 +00:00
task wrapper(type: Wrapper) {
gradleVersion = '6.1.1'
}