34 lines
654 B
Groovy
34 lines
654 B
Groovy
plugins {
|
|
id 'java'
|
|
id 'antlr'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
// use ANTLR version 3, with explicit k for LL(k)
|
|
antlr "org.antlr:antlr:3.5.2"
|
|
implementation 'org.pcollections:pcollections:4.0.2'
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = "1.21"
|
|
targetCompatibility = "1.21"
|
|
}
|
|
|
|
generateGrammarSource {
|
|
arguments += [ '-no-visitor', '-no-listener' ]
|
|
outputDirectory = new File(buildDir.toString() + "/generated-src/antlr/main/TP2/")
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes (
|
|
'Main-Class': 'TP2.Main',
|
|
'Class-Path': configurations.runtimeClasspath.files.collect { "file:///" + it.canonicalPath }.join(' ')
|
|
|
|
)
|
|
}
|
|
} |