-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
75 lines (67 loc) · 1.9 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
buildscript {
ext.kotlin_version = '1.4.0'
repositories {
mavenCentral()
maven {
name 'JFrog OSS snapshot repo'
url 'https://oss.jfrog.org/oss-snapshot-local/'
}
jcenter()
}
}
plugins {
id 'antlr'
id 'java'
id 'idea'
id "org.jetbrains.kotlin.jvm" version "$kotlin_version"
}
group 'com.llamalad7'
version '1.0-SNAPSHOT'
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://maven.hackery.site/" }
maven { url "https://kotlin.bintray.com/kotlinx" }
}
configurations {
embed
implementation.extendsFrom(embed)
}
dependencies {
antlr "org.antlr:antlr4:4.8"
embed "org.antlr:antlr4-runtime:4.8"
embed "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
embed ("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version") {
exclude module: "kotlin-stdlib"
}
embed "org.ow2.asm:asm:8.0.1"
embed "org.ow2.asm:asm-tree:8.0.1"
embed "org.ow2.asm:asm-commons:8.0.1"
embed "codes.som.anthony:koffee:8.0.2"
embed "codes.som.anthony:koffee-kotlin-reflect-sugar:1.0.0"
embed "com.github.ajalt:clikt:2.8.0"
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testImplementation 'junit:junit:4.13'
}
generateGrammarSource {
maxHeapSize = "64m"
arguments += ['-package', 'com.llamalad7.pseudo.generated']
outputDirectory = new File("src/main/java/com/llamalad7/pseudo/generated/".toString())
}
compileJava.dependsOn generateGrammarSource
clean {
delete "src/main/java/com/llamalad7/pseudo/generated/"
}
jar {
exclude('com/llamalad7/pseudo/MainKt*.class')
manifest {
attributes 'Main-Class': 'com.llamalad7.pseudo.CLIKt'
}
from {
configurations.embed.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}