forked from itsTyrion/BungeeOnlineTime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
101 lines (84 loc) · 3.07 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id "org.jetbrains.kotlin.jvm" version "1.9.10"
id "org.jetbrains.kotlin.kapt" version "1.9.10"
id "com.github.johnrengelman.shadow" version "8.1.1"
id "net.kyori.blossom" version "2.1.0"
}
configurations {
bungeecord
}
repositories {
mavenCentral()
maven {
name "Sonatype"
url uri("https://oss.sonatype.org/content/repositories/snapshots")
}
maven {
name "PaperMC"
url uri("https://repo.papermc.io/repository/maven-public/")
}
}
dependencies {
implementation "org.xerial:sqlite-jdbc:3.40.1.0"
implementation "com.mysql:mysql-connector-j:8.0.33"
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.10"
implementation "org.yaml:snakeyaml:2.0"
bungeecord "org.slf4j:slf4j-api:2.0.5"
bungeecord "org.slf4j:slf4j-simple:2.0.5"
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:1.9.10"
compileOnly "net.md-5:bungeecord-api:1.20-R0.1-SNAPSHOT"
compileOnly "com.velocitypowered:velocity-api:3.2.0-SNAPSHOT"
kapt "com.velocitypowered:velocity-api:3.2.0-SNAPSHOT"
}
group = "lu.r3flexi0n"
version = "8.4.1"
description = "BungeeOnlineTime"
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.release = 17
options.deprecation true
}
sourceSets {
main.blossom.kotlinSources {
property("version", version)
}
}
shadowJar {
minimize() { exclude(dependency("org.xerial:sqlite-jdbc")) }
archiveClassifier = ""
relocate "kotlin", "de.itsTyrion.shaded.kotlin"
relocate "org.yaml", "de.itsTyrion.shaded.snakeyaml"
def sqlite = "org/sqlite/native"
exclude "$sqlite/*/ppc64/**", "$sqlite/*/arm*/**", "$sqlite/*/x86/**" // uncommon architectures for MC servers
exclude "$sqlite/Linux-*/**", "$sqlite/Mac/**", "$sqlite/FreeBSD/**" // and uncommon OS' for MC servers
}
tasks.register("bungeecord", ShadowJar) {
from sourceSets.main.output
configurations = [project.configurations.runtimeClasspath, project.configurations.bungeecord]
archiveClassifier = "bungeecord"
minimize() { exclude(dependency("org.xerial:sqlite-jdbc")) }
relocate "kotlin", "de.itsTyrion.shaded.kotlin"
relocate "org.yaml", "de.itsTyrion.shaded.snakeyaml"
relocate "org.slf4j", "de.itsTyrion.shaded.slf4j"
def sqlite = "org/sqlite/native"
exclude "$sqlite/*/ppc64/**", "$sqlite/*/arm*/**", "$sqlite/*/x86/**" // uncommon architectures for MC servers
exclude "$sqlite/Linux-*/**", "$sqlite/Mac/**", "$sqlite/FreeBSD/**" // and uncommon OS' for MC servers
}
tasks.register("fat", ShadowJar) {
from sourceSets.main.output
configurations = [project.configurations.runtimeClasspath]
archiveClassifier = "fat"
minimize() {
exclude(dependency("com.mysql:mysql-connector-j"))
exclude(dependency("org.xerial:sqlite-jdbc"))
}
relocate "kotlin", "de.itsTyrion.shaded.kotlin"
relocate "org.yaml", "de.itsTyrion.shaded.snakeyaml"
}
gradle.beforeProject {
generateTemplates
}
build {
dependsOn([shadowJar, bungeecord, fat])
}