forked from lenaRB/crml-compiler
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
95 lines (77 loc) · 2.05 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
* Gradle build file for the CRML compiler
*/
plugins {
id 'application'
id 'antlr'
id 'com.github.johnrengelman.shadow' version "8.1.1"
id 'java'
}
repositories{
mavenCentral()
}
dependencies {
antlr "org.antlr:antlr4:4.9.2"
implementation ('org.apache.logging.log4j:log4j-api') {
version {
strictly '[2.17.0]'
}
}
implementation ('org.apache.logging.log4j:log4j-core') {
version {
strictly '[2.17.0]'
}
}
implementation(platform("org.junit:junit-bom:5.10.1"))
implementation 'org.junit.jupiter:junit-jupiter:5.10.1'
implementation "org.junit.platform:junit-platform-launcher"
implementation "org.jcommander:jcommander:1.83"
implementation "org.junit.platform:junit-platform-reporting:1.10.1"
implementation "com.aventstack:extentreports:5.0.9"
implementation 'com.j2html:j2html:1.6.0'
}
sourceSets { // adding tests to source directories to run test suite
main {
java {
srcDir 'src/test/java'
}
}
}
task(crmlc, dependsOn: 'classes', type: JavaExec) {
mainClass = 'crml.compiler.CRMLC'
classpath = sourceSets.main.runtimeClasspath
}
task printSourceSetInformation { // for debugging purposes
doLast{
sourceSets.each { srcSet ->
println "["+srcSet.name+"]"
print "-->Source directories: "+srcSet.allJava.srcDirs+"\n"
print "-->Output directories: "+srcSet.output.classesDirs.files+"\n"
println ""
}
}
}
application {
mainClass = 'crml.compiler.CRMLC'
}
generateGrammarSource {
arguments += ["-visitor", "-long-messages", "-Xlog", "-listener", "-lib", "src/main/antlr/grammar"]
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
test.ignoreFailures true
}
jar {
manifest {
attributes 'Main-Class': 'crml.compiler.CRMLC'
attributes 'Multi-Release': 'true'
}
}
apply plugin: 'java'
compileJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}