-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
66 lines (54 loc) · 1.23 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
plugins {
id 'antlr'
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.4.0'
id 'org.jetbrains.dokka' version '0.10.1'
id 'com.github.johnrengelman.shadow' version '6.0.0'
}
group = 'net.joelcourtney'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
jcenter()
}
dependencies {
antlr "org.antlr:antlr4:4.8"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation 'org.jscience:jscience:4.3.1'
testImplementation "org.junit.jupiter:junit-jupiter:5.6.2"
}
generateGrammarSource {
arguments += ["-no-visitor", "-no-listener"]
}
tasks.compileKotlin.dependsOn(generateGrammarSource)
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
dokka {
outputFormat = 'html'
outputDirectory = 'doc'
}
jar {
manifest {
attributes "Main-Class": "MainKt"
}
}
shadowJar {
minimize()
}
task(wrap, type: Exec) {
dependsOn shadowJar
executable 'cat'
args 'src/main/bash/wrapper.sh', 'build/libs/hadron-1.0-SNAPSHOT-all.jar'
doFirst {
standardOutput = new FileOutputStream('hadron')
}
}
task(hadron, type: Exec) {
dependsOn wrap
workingDir "."
commandLine 'chmod', '+x', 'hadron'
}