-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
60 lines (50 loc) · 1.21 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
plugins {
id 'java'
id 'application'
id 'org.jetbrains.kotlin.jvm' version '1.5.31'
}
group 'org.f3rni'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = sourceCompatibility
mainClassName = 'org.f3rni.Main'
repositories {
mavenCentral()
}
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')
implementation 'br.com.gamemods:nbt-manipulator:3.1.0'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'commons-cli:commons-cli:1.5.0'
implementation 'com.google.code.gson:gson:2.10.1'
}
jar {
manifest {
attributes(
'Main-Class': "$mainClassName",
)
}
}
task copyTask(type: Copy) {
from('.') {
include 'blocks.json'
}
into 'build/libs'
}
task fatJar(type: Jar) {
manifest.from jar.manifest
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
classifier = 'all'
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
with jar
}
task buildApp (dependsOn: [fatJar, copyTask])
artifacts {
archives fatJar
}