-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
74 lines (61 loc) · 1.91 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
group "xyz.jadonfowler"
version "0.0.0-SNAPSHOT"
buildscript {
ext.kotlin_version = "1.0.6"
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: "antlr"
apply plugin: "java"
apply plugin: "kotlin"
apply plugin: "application"
apply plugin: "jacoco"
mainClassName = "xyz.jadonfowler.compiler.CompilerKt"
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Compiler',
'Implementation-Version': version,
'Main-Class': 'xyz.jadonfowler.compiler.CompilerKt'
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
repositories {
mavenCentral()
}
// https://github.com/bytedeco/javacpp-presets/wiki/Issues-with-Build-Tools#gradle
configurations {
all*.exclude group: "org.bytedeco", module: "javacpp-presets"
}
dependencies {
antlr "org.antlr:antlr4:4.5" // use ANTLR version 4
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.bytedeco:javacpp:1.3"
compile "org.bytedeco.javacpp-presets:llvm:3.9.0-1.3"
compile "org.bytedeco.javacpp-presets:llvm:3.9.0-1.3:linux-x86_64"
compile "org.ow2.asm:asm:5.0.3"
testCompile "junit:junit:4.11"
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
}
jacoco {
toolVersion = "0.7.4+"
}
jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
generateGrammarSource {
maxHeapSize = "64m"
arguments += ["-visitor", "-package", "xyz.jadonfowler.compiler.parser"]
// Output generated sources from ANTLR into xyz.jadonfowler.compiler.parser
outputDirectory = new File("src//main/java/xyz/jadonfowler/compiler/parser/".toString())
}
compileKotlin.dependsOn generateGrammarSource