-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
109 lines (98 loc) · 3.26 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
102
103
104
105
106
107
108
109
plugins {
id 'java'
id 'idea'
id 'maven-publish'
id "com.github.johnrengelman.shadow" version "7.1.2"
}
repositories {
mavenCentral()
maven {
url = uri('https://hub.spigotmc.org/nexus/content/repositories/snapshots/')
}
maven {
url = uri('https://repo.papermc.io/repository/maven-public/')
}
maven {
url = uri('https://oss.sonatype.org/content/groups/public/')
}
maven {
url = uri('https://repo.codemc.org/repository/maven-public/')
}
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
maven {
url = uri('https://redempt.dev')
}
maven {
url = uri('https://jitpack.io')
}
maven {
url = uri('https://repo.extendedclip.com/content/repositories/placeholderapi/')
}
maven {
url = uri('https://hub.jeff-media.com/nexus/repository/jeff-media-public/')
}
}
dependencies {
implementation 'de.tr7zw:item-nbt-api:2.13.1'
implementation 'com.github.Redempt:RedLib:6.6.1'
implementation 'com.github.Redempt:Crunch:2.0.3'
implementation 'com.github.cryptomorin:XSeries:11.2.0'
implementation 'com.github.Revxrsal.Lamp:common:3.2.1'
implementation 'com.github.Revxrsal.Lamp:bukkit:3.2.1'
implementation 'com.github.Sven65:Item-Names:1.0.2'
implementation 'org.bstats:bstats-bukkit:3.0.2'
implementation 'com.jeff_media:MorePersistentDataTypes:2.4.0'
compileOnly files('libs/folia-api-1.20.4-R0.1-SNAPSHOT.jar') // Modified API jar with Java 8 support
compileOnly 'net.kyori:adventure-api:4.17.0' // Not used but needed for Folia compilation
compileOnly 'org.spigotmc:spigot-api:1.14.4-R0.1-SNAPSHOT'
compileOnly 'org.jetbrains:annotations:24.1.0'
compileOnly 'me.clip:placeholderapi:2.11.6'
}
group = 'me.byteful.plugin'
version = '1.4.0.2'
description = 'LevelTools'
java.sourceCompatibility = JavaVersion.VERSION_17
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}
shadowJar {
minimize()
archiveBaseName.set("LevelTools")
archiveClassifier.set("")
relocate "de.tr7zw.changeme.nbtapi", "me.byteful.plugin.leveltools.libs.nbtapi"
relocate "com.cryptomorin.xseries", "me.byteful.plugin.leveltools.libs.xseries"
relocate "redempt.redlib", "me.byteful.plugin.leveltools.libs.redlib"
relocate 'revxrsal.commands', 'me.byteful.plugin.leveltools.libs.lamp'
relocate 'org.bstats', 'me.byteful.plugin.leveltools.libs.bstats'
relocate 'com.jeff_media.morepersistentdatatypes', 'me.byteful.plugin.leveltools.libs.morepersistentdatatypes'
}
def targetJavaVersion = 8
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = 17
targetCompatibility = 8
}
tasks.withType(JavaCompile).configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('*.yml') {
expand props
}
}
compileJava { // Preserve parameter names in the bytecode
options.compilerArgs += ["-parameters"]
options.fork = true
options.forkOptions.executable = "javac"
}