forked from Xiao-MoMi/Custom-Nameplates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
71 lines (63 loc) · 2.86 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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
group = 'net.momirealms'
version = '2.2.1.0-hotfix'
repositories {
maven {name = "aliyun-repo"; url = "https://maven.aliyun.com/repository/public/"}
maven {name = 'papermc-repo'; url = 'https://papermc.io/repo/repository/maven-public/'}
maven {name = 'sonatype'; url = 'https://oss.sonatype.org/content/groups/public/'}
maven {name = "dmulloy2-repo"; url = "https://repo.dmulloy2.net/repository/public/"}
maven {name = "clip-repo"; url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'}
maven {name = "jitpack"; url = 'https://jitpack.io'}
maven {name = "codecrafter47-repo"; url = 'https://nexus.codecrafter47.de/content/repositories/public/'}
maven {name = "opencollab-snapshot-repo"; url = 'https://repo.opencollab.dev/main/'}
mavenCentral()
}
dependencies {
compileOnly fileTree(dir:'libs',includes:['*.jar'])
compileOnly ('io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT')
compileOnly ('me.clip:placeholderapi:2.11.3')
compileOnly ('com.zaxxer:HikariCP:5.0.1')
compileOnly ('commons-io:commons-io:2.11.0')
compileOnly ('dev.dejvokep:boosted-yaml:1.3')
compileOnly ('org.geysermc.geyser:api:2.1.0-SNAPSHOT')
compileOnly ('org.geysermc.floodgate:api:2.0-SNAPSHOT')
compileOnly ('net.md-5:bungeecord-api:1.19-R0.1-SNAPSHOT')
compileOnly ('com.github.LoneDev6:api-itemsadder:3.2.3c')
compileOnly ('com.github.FrancoBM12:API-MagicCosmetics:2.2.0')
implementation ('net.kyori:adventure-api:4.14.0')
implementation ('net.kyori:adventure-platform-bukkit:4.3.0')
implementation ('net.kyori:adventure-text-minimessage:4.14.0')
implementation ('net.kyori:adventure-text-serializer-gson:4.14.0')
implementation ("org.bstats:bstats-bukkit:3.0.1")
implementation fileTree (dir:'libs',includes:['BiomeAPI.jar'])
}
def targetJavaVersion = 17
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
tasks.withType(JavaCompile).configureEach {
options.release = targetJavaVersion
options.encoding = "UTF-8"
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
shadowJar {
relocate ('net.kyori', 'net.momirealms.customnameplates.libs.net.kyori')
relocate ('org.bstats', 'net.momirealms.customnameplates.libs.org.bstats')
relocate ('net.momirealms.biomeapi', 'net.momirealms.customnameplates.libs.net.momirealms.biomeapi')
}
tasks.register("delete", Delete).get().delete("build/libs/"+project.name+"-"+project.version+".jar")
tasks.named("build").get().dependsOn("shadowJar").finalizedBy("delete").doLast {
println("Deleting: "+ "build/libs/"+project.name+"-"+project.version+".jar")
}