-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
51 lines (43 loc) · 1.2 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
plugins {
id 'application'
id 'java-library'
id 'antlr'
}
repositories {
mavenCentral()
}
dependencies {
antlr "org.antlr:antlr4:4.11.1"
implementation project(':RegEx')
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4'
implementation 'org.apache.commons:commons-text:1.10.0'
implementation 'org.ow2.asm:asm:9.4'
implementation 'org.ow2.asm:asm-tree:9.4'
implementation 'org.ow2.asm:asm-commons:9.4'
implementation 'org.antlr:antlr4-runtime:4.11.1'
}
application.mainClass = 'bsx.Main'
jar {
manifest {
attributes 'Main-Class': application.mainClass.get()
}
}
task fatjar(type: Jar) {
archiveClassifier = 'fatjar'
manifest = jar.manifest
with jar
}
build.dependsOn fatjar
task configureFatJar {
doLast {
configurations.runtimeClasspath.each { dep ->
fatjar.from(project.zipTree(dep)) {
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'module-info.class'
duplicatesStrategy DuplicatesStrategy.INCLUDE
}
}
}
outputs.upToDateWhen { false }
}
fatjar.dependsOn configureFatJar