-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
199 lines (174 loc) · 6.48 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
plugins {
id 'idea'
id 'org.jetbrains.kotlin.jvm' version '1.7.10'
id 'org.jetbrains.kotlin.kapt' version '1.7.10'
id 'java'
id 'kr.entree.spigradle' version '2.4.2'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.7.10'
}
group 'me.phantomx.fjetpackreloaded'
version '1.5'
java {
targetCompatibility = "1.8"
sourceCompatibility = "1.8"
}
repositories {
mavenCentral()
maven {
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
content {
includeGroup 'org.bukkit'
includeGroup 'org.spigotmc'
}
}
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url = 'https://oss.sonatype.org/content/repositories/central' }
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/public/' }
maven { url 'https://jitpack.io' }
maven { url 'https://repo.bg-software.com/repository/api/' }
}
def urlFile = { url, name ->
File file = new File("$buildDir/download/${name}.jar")
file.parentFile.mkdirs()
if (!file.exists()) {
new URL(url).withInputStream { downloadStream ->
file.withOutputStream { fileOut ->
fileOut << downloadStream
}
}
}
files(file.absolutePath)
} as Object
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
// conflict with eco
//implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.10"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'org.json:json:20211205'
//implementation "com.charleskorn.kaml:kaml:0.43.0"
implementation "net.mamoe.yamlkt:yamlkt:0.12.0"
implementation 'org.bstats:bstats-bukkit:3.0.0'
// comp
compileOnly 'com.github.TechFortress:GriefPrevention:16.18'
compileOnly 'com.bgsoftware:SuperiorSkyblockAPI:1.11.0'
// Pick only one of these and read the comment in the repositories block.
compileOnly 'org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT' // The Spigot API with no shadowing. Requires the OSS repo.
//compileOnly 'org.spigotmc:spigot:1.18.2-R0.1-SNAPSHOT' // The full Spigot server with no shadowing. Requires mavenLocal.
//compileOnly spigot('1.18.1')
//compileOnly urlFile('https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.18.2-R0.1-SNAPSHOT/spigot-api-1.18.2-R0.1-20220318.230433-21.jar', 'spigot-api-1.18.2-R0.1-SNAPSHOT')
//compileOnly files('G:/Server/Minecraft/1.18/bundler/versions/spigot-1.18-R0.1-SNAPSHOT.jar')
testImplementation 'junit:junit:4.13'
testImplementation 'com.github.seeseemelk:MockBukkit-v1.16:1.0.0'
}
test {
useJUnit()
maxHeapSize = '1G'
}
shadowJar {
relocate("org.bstats", "me.phantomx.fjetpackreloaded")
relocate("kotlin", "me.phantomx.fjetpackreloaded.kotlin") {
//exclude "kotlin/reflect/**"
}
relocate("kotlinx", "me.phantomx.fjetpackreloaded.kotlinx")
relocate("com.google.gson", "me.phantomx.fjetpackreloaded.gson")
relocate("net.mamoe.yamlkt", "me.phantomx.fjetpackreloaded.yamlkt")
}
spigot {
main = 'me.phantomx.fjetpackreloaded.FJetpackReloaded'
description = 'Lightweight, Fuel System and Customizable a Jetpack Plugin'
authors = ['PhantomX']
depends = []
loadBefore = ['SuperiorSkyblock2']
softDepends = ['GriefPrevention']
apiVersion = '1.13'
//load = POSTWORLD //STARTUP
libraries = ['org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4']
commands {
fjetpackreloaded {
aliases = ['fjr']
description = 'FJetpackReloaded Main command.'
}
ss2fjr {
description = 'FJetpackReloaded hook SuperiorSkyblock2 commands'
}
}
permissions {
'fjetpackreloaded.help' {
description = 'Allows FJetpackReloaded help command'
defaults = 'true'
}
'fjetpackreloaded.*' {
description = 'Allows to use of all FJetpackReloaded commands.'
defaults = 'op'
children = [
'fjetpackreloaded.reload': true,
'fjetpackreloaded.set': true,
'fjetpackreloaded.get': true,
'fjetpackreloaded.give': true,
'fjetpackreloaded.getfuel': true,
'fjetpackreloaded.givefuel': true,
'fjetpackreloaded.checkupdate': true
]
}
'fjetpackreloaded.reload' {
description = 'Reload all configs plugin'
defaults = 'false'
}
'fjetpackreloaded.set' {
description = 'Set jetpack item in hand'
defaults = 'false'
}
'fjetpackreloaded.get' {
description = 'Get/Give the jetpack item'
defaults = 'false'
}
'fjetpackreloaded.give' {
description = 'Get/Give the jetpack item'
defaults = 'false'
}
'fjetpackreloaded.getfuel' {
description = 'Get/Give the custom fuel item'
defaults = 'false'
}
'fjetpackreloaded.givefuel' {
description = 'Get/Give the custom fuel item'
defaults = 'false'
}
'fjetpackreloaded.checkupdate' {
description = 'Check update this plugin'
defaults = 'false'
}
'ss2fjr.*' {
description = 'Allows to use of all FJetpackReloaded SuperiorSkyblock2 commands.'
defaults = 'op'
children = [
'fjr.superiorskyblock2.allow': true,
'fjr.superiorskyblock2.allow.other': true,
'fjr.superiorskyblock2.deny': true,
'fjr.superiorskyblock2.deny.other': true
]
}
'ss2fjr.help' {
description = 'Show all available commands'
defaults = 'true'
}
'ss2fjr.allow' {
description = 'Allow player to fly inside island'
defaults = 'true'
}
'ss2fjr.allow.other' {
description = 'Allow other player to set island jetpack to fly'
defaults = 'false'
}
'ss2fjr.deny' {
description = 'Deny player to fly inside island'
defaults = 'true'
}
'ss2fjr.deny.other' {
description = 'Deny other player to set island jetpack to fly'
defaults = 'false'
}
}
}