prog8/parser/build.gradle

54 lines
1019 B
Groovy
Raw Normal View History

plugins {
id 'antlr'
id 'java'
}
2019-08-26 19:27:45 +00:00
targetCompatibility = 1.8
sourceCompatibility = 1.8
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-02-07 22:58:07 +00:00
antlr 'org.antlr:antlr4:4.8'
implementation 'org.antlr:antlr4-runtime:4.8'
2020-02-07 22:58:07 +00:00
// antlr('org.antlr:antlr4:4.8') {
// 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'
}