-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
95 lines (76 loc) · 2.48 KB
/
Copy pathbuild.gradle
File metadata and controls
95 lines (76 loc) · 2.48 KB
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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'maven-publish'
}
group 'FireMysteryBlocks'
version = "2.3.17"
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
dependencies {
// implementation project(":API")
// implementation fileTree("archive")
// Server jars
compileOnly 'org.spigotmc:spigot-api:1.20.1-R0.1-20230921.163938-66'
// Addons
compileOnly files("lib/PlaceholderAPI-2.11.2.jar")
compileOnly files("lib/CMI-9.6.2.3.jar")
compileOnly files("lib/CMILib-1.4.0.4.jar")
compileOnly files("lib/HolographicDisplays-3.0.4.jar")
compileOnly files("lib/FancyHolograms-2.4.1.jar")
compileOnly 'com.github.decentsoftware-eu:decentholograms:2.8.3'
// Implementations
implementation files("lib/IridiumColorAPI-1.0.4.jar")
implementation 'com.zaxxer:HikariCP:4.0.3'
}
allprojects {
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
repositories {
mavenCentral()
maven { url = 'https://jitpack.io' }
maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url = 'https://repo.codemc.io/repository/maven-public/' }
}
dependencies {
// Annotation
compileOnly 'org.jetbrains:annotations:24.0.0'
compileOnly 'org.projectlombok:lombok:1.18.26'
annotationProcessor 'org.projectlombok:lombok:1.18.26'
}
build {
dependsOn shadowJar
}
}
subprojects {
shadowJar {
archiveFileName = "${project.group}-${project.name}-${rootProject.version}.jar"
destinationDirectory = file("../target/${rootProject.version}")
}
}
shadowJar {
dependsOn(jar)
delete fileTree("./target/") {
exclude archiveFileName.get()
}
// Relocate
relocate 'de.tr7zw.changeme.nbtapi', 'cz.devfire.mysteryblocks.nbtapi'
archiveFileName = "${project.name}-${project.version}.jar"
destinationDirectory = file("target/${rootProject.version}")
}
processResources {
outputs.upToDateWhen { false }
eachFile { details ->
if (details.name.contentEquals('plugin.yml') || details.name.contentEquals('bungee.yml')) {
filter { String line ->
line.replace('${project.version}', (String) version)
}
}
}
}
build {
dependsOn clean
dependsOn shadowJar
}
publish.shouldRunAfter shadowJar