-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·62 lines (50 loc) · 1.45 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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
group = 'dev.firstdark.servermeta'
version = "${version_major}.${version_minor}.${version_patch}"
repositories {
mavenCentral()
maven {
url "https://maven.firstdark.dev/releases"
}
}
configurations {
shaded
implementation.extendsFrom shaded
}
dependencies {
shaded "com.google.code.gson:gson:${gson}"
shaded "com.squareup.okhttp3:okhttp:${okhttp}"
shaded "com.hypherionmc.jsondb:jsondb-core:${jsondb}"
shaded "io.javalin:javalin:${javalin}"
shaded "org.apache.maven:maven-artifact:${maven_art}"
shaded "org.dom4j:dom4j:${dom4j}"
// Logging
shaded "org.apache.logging.log4j:log4j-api:${log4j}"
shaded "org.apache.logging.log4j:log4j-core:${log4j}"
shaded "org.apache.logging.log4j:log4j-slf4j2-impl:${log4j}"
compileOnly "org.projectlombok:lombok:${lombok}"
annotationProcessor "org.projectlombok:lombok:${lombok}"
}
shadowJar {
from sourceSets.main.output
configurations = [project.configurations.shaded]
setArchiveClassifier(null)
if (project.hasProperty("isDocker") && project.isDocker == 'true') {
setArchiveFileName("servermeta.jar")
}
}
jar {
setArchiveClassifier("slim")
finalizedBy(shadowJar)
manifest {
attributes([
'Main-Class': 'dev.firstdark.servermeta.MetaServer'
])
}
}
shadowJar.doLast {
delete jar.getArchiveFile()
}