forked from lenaRB/crml-compiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
80 lines (65 loc) · 1.57 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
/*
* 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]'
}
}
testImplementation(platform('org.junit:junit-bom:5.9.1'))
testImplementation('org.junit.jupiter:junit-jupiter')
testImplementation 'io.github.hakky54:logcaptor:2.7.10'
}
/** sourceSets {
generated {
java.srcDirs += 'target/generated-src/antlr/main/'
}
} */
task(translate, dependsOn: 'classes', type: JavaExec) {
mainClass = 'crml.translator.Main'
classpath = sourceSets.main.runtimeClasspath
}
task(parse, dependsOn: 'classes', type: JavaExec) {
mainClass = 'crml.parser.Main'
classpath = sourceSets.main.runtimeClasspath
}
application {
mainClass = 'crml.translator.Main'
}
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.translator.Main'
attributes 'Multi-Release': 'true'
}
}
apply plugin: 'java'
compileJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}