-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
46 lines (39 loc) · 1.21 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
import org.apache.tools.ant.filters.*
apply plugin: "jacoco"
task antlrPG(type: JavaExec) {
classpath = configurations.compile
main = 'org.antlr.v4.Tool'
args 'src/main/resources/ru/nlp_project/story_line2/glr_parser/grammar_parser/nglr_grammar.g4'
}
antlrPG.setDependsOn([])
task moveGeneratedFiles(type: Copy, dependsOn: antlrPG) {
from 'src/main/resources/ru/nlp_project/story_line2/glr_parser/grammar_parser'
include '**/*.java'
into 'src/main/java/ru/nlp_project/story_line2/glr_parser/grammar_parser'
// Use a closure to map the file name
rename { String fileName ->
fileName.replace( 'nglr_grammar' , 'NGLR' )
}
filter{
String line -> line.replaceAll("nglr_grammar", "NGLR")
}
}
compileJava.dependsOn moveGeneratedFiles
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${buildDir}/jacocoHtml"
}
}
test {
jacoco{
excludes = ["ru/nlp_project/story_line2/glr_parser/grammar_parser/*"]
}
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-Xmx1024M', '-Xdebug',
'-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009'
} else {
jvmArgs '-Xmx1024M', '-XX:+UseG1GC'
}
}