47 lines
864 B
Groovy
47 lines
864 B
Groovy
plugins {
|
|
id 'java'
|
|
id 'application'
|
|
id 'antlr'
|
|
id 'jacoco'
|
|
}
|
|
|
|
group 'de.churl'
|
|
version '1.0'
|
|
sourceCompatibility = '14'
|
|
mainClassName = 'StupsCompiler'
|
|
|
|
jacocoTestReport {
|
|
dependsOn test // tests are required to run before generating the report
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes "Main-Class": "$mainClassName"
|
|
}
|
|
|
|
from {
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
}
|
|
|
|
generateGrammarSource {
|
|
outputDirectory = file("src/main/java/lexer")
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
antlr "org.antlr:antlr4:4.8"
|
|
|
|
testImplementation("org.assertj:assertj-core:3.18.1")
|
|
testImplementation(platform('org.junit:junit-bom:5.7.0'))
|
|
testImplementation('org.junit.jupiter:junit-jupiter')
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
finalizedBy jacocoTestReport
|
|
}
|