mirror of
https://github.com/irmen/prog8.git
synced 2024-11-18 19:12:44 +00:00
54 lines
1015 B
Groovy
54 lines
1015 B
Groovy
plugins {
|
|
id 'antlr'
|
|
id 'java'
|
|
}
|
|
|
|
targetCompatibility = 11
|
|
sourceCompatibility = 11
|
|
|
|
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.9'
|
|
implementation 'org.antlr:antlr4-runtime:4.9'
|
|
|
|
// antlr('org.antlr:antlr4:4.9') {
|
|
// 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"]
|
|
}
|
|
}
|
|
}
|
|
|
|
task wrapper(type: Wrapper) {
|
|
gradleVersion = '6.7'
|
|
}
|