This repository has been archived by the owner on Jan 3, 2025. It is now read-only.
forked from Pikachu920/SkBee
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
133 lines (109 loc) · 3.52 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'maven-publish'
}
compileJava {
options.encoding = 'UTF-8'
}
// SkBee-Continued version
version = '3.7-beta3'
def latestJava = 21
def oldestJava = 17
repositories {
mavenCentral()
mavenLocal()
// Paper
maven { url 'https://repo.papermc.io/repository/maven-public/' }
// Skript
maven { url 'https://repo.skriptlang.org/releases' }
// JitPack
maven { url 'https://jitpack.io' }
// CodeMC (NBT-API)
maven { url 'https://repo.codemc.io/repository/maven-public/' }
}
dependencies {
// Paper
compileOnly "io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT"
// Skript
compileOnly(group: 'com.github.SkriptLang', name: 'Skript', version: '2.9.5') {
transitive = false
}
// commons-io
compileOnly("commons-io:commons-io:2.11.0")
compileOnly("org.apache.commons:commons-text:1.10.0")
// NBT-API
implementation("de.tr7zw:item-nbt-api:2.14.0") {
transitive = false
}
// FastBoard
implementation("fr.mrmicky:fastboard:2.1.3")
// Virtual Furnace
implementation("com.github.ShaneBeeStudios:VirtualFurnace:1.0.0") {
transitive = false
}
// bStats
implementation(group: 'org.bstats', name: 'bstats-bukkit', version: '3.0.2')
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs += ['-source', '' + oldestJava, '-target', '' + oldestJava]
}
build {
dependsOn(shadowJar)
tasks.withType(JavaCompile).tap {
configureEach {
options.compilerArgs.add("-Xlint:unchecked")
options.compilerArgs.add("-Xlint:deprecation")
}
}
}
processResources {
filesNotMatching("**/*.png") {
filter ReplaceTokens, tokens: ["version": project.version]
}
}
shadowJar {
manifest {
attributes "Main-Class" : "com.shanebeestudios.skbee.game.GamesMain"
}
archiveFileName = project.name + "-" + project.version + ".jar"
relocate("de.tr7zw.changeme.nbtapi", "com.shanebeestudios.skbee.api.nbt")
relocate("de.tr7zw.annotations", "com.shanebeestudios.skbee.api.nbt.annotations")
relocate("fr.mrmicky.fastboard", "com.shanebeestudios.skbee.api.fastboard")
relocate("com.shanebeestudios.vf", "com.shanebeestudios.skbee.api.virtualfurnace")
relocate("org.bstats", "com.shanebeestudios.skbee.metrics")
exclude('META-INF/**', 'LICENSE')
}
// Run task to build jar to another spot
tasks.register('server', Copy) {
from shadowJar
// Change this to wherever you want your jar to build
into '/Users/ShaneBee/Desktop/Server/Skript/1-21-1/plugins'
}
publishing {
publications {
maven(MavenPublication) {
groupId 'com.github.ShaneBeee'
artifactId 'SkBee'
version project.version
artifact shadowJar
artifact tasks.jar
}
}
}
javadoc {
destinationDir = file("${projectDir}/build/javadoc")
options {
links('https://hub.spigotmc.org/javadocs/spigot/')
links('https://docs.skriptlang.org/javadocs/')
links('https://tr7zw.github.io/Item-NBT-API/v2-api/')
links('https://jd.advntr.dev/api/4.14.0/')
}
options.addStringOption('Xdoclint:none', '-quiet')
exclude("com/shanebeestudios/skbee/api/listener", "com/shanebeestudios/skbee/elements",
"com/shanebeestudios/skbee/api/command", "com/shanebeestudios/skbee/game")
}