forked from jcoplien/trygve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
45 lines (37 loc) · 1.13 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
apply plugin: 'java'
apply plugin: 'antlr'
apply plugin: 'application'
apply plugin: 'idea'
apply plugin: 'eclipse'
repositories {
jcenter()
}
mainClassName = "info.fulloo.trygve.editor.Main"
applicationDefaultJvmArgs = ["-ea"]
compileJava {
options.fork = true
options.incremental = true
}
sourceSets.main.java.srcDirs = [
'src/main/java',
'src/main/generated'
]
dependencies {
compile files('lib/antlr-runtime-4.5.1.jar')
}
task antlr(type: Exec) {
workingDir 'src/main/java'
if (System.getProperty('os.name').toLowerCase().contains('windows') ||
System.getProperty('os.name').toLowerCase().contains('Windows') ) {
commandLine 'java',
'-Dline.separator=\n',
'-jar', "$rootProject.projectDir\\lib\\antlr-4.5.1-complete.jar",
'-o', "$rootProject.projectDir\\src\\main\\generated",
'info\\fulloo\\trygve\\parser\\Kant.g4'
} else {
commandLine 'java',
'-jar', "$rootProject.projectDir/lib/antlr-4.5.1-complete.jar",
'-o', "$rootProject.projectDir/src/main/generated",
'info/fulloo/trygve/parser/Kant.g4'
}
}