forked from tritonmc/Triton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
143 lines (130 loc) · 4.04 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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.0'
id 'net.minecrell.plugin-yml.bukkit' version '0.5.0'
id 'net.minecrell.plugin-yml.bungee' version '0.5.0'
}
String pluginDescription = project.property("pluginDescription")
String pluginWebsite = project.property("pluginWebsite")
String pluginAuthor = project.property("pluginAuthor")
String pluginApiVersion = project.property("pluginApiVersion")
String pluginName = project.property("pluginName")
// Plugins that also hook into ProtocolLib and therefore have to be loaded before Triton
List conflictingPlugins = ['Citizens']
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'net.minecrell.plugin-yml.bukkit'
apply plugin: 'net.minecrell.plugin-yml.bungee'
group 'com.rexcantor64.triton'
allprojects {
apply plugin: 'java'
version '3.10.1'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
maven {
name 'diogotcRepositorySnapshots'
url 'https://repo.diogotc.com/snapshots/'
}
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://repo.dmulloy2.net/nexus/repository/public/' }
maven { url 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
maven {
name 'CodeMC'
url 'https://repo.codemc.org/repository/maven-public'
}
maven {
name 'velocity'
url 'https://nexus.velocitypowered.com/repository/maven-public/'
}
}
}
subprojects {
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
testCompileOnly 'org.projectlombok:lombok:1.18.34'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.34'
}
}
dependencies {
implementation project(path: ":core")
}
bukkit {
name = pluginName
version = project.version
description = pluginDescription
website = pluginWebsite
author = pluginAuthor
main = 'com.rexcantor64.triton.plugin.SpigotPlugin'
apiVersion = pluginApiVersion
depend = ['ProtocolLib']
softDepend = ['PlaceholderAPI', 'packetevents'] + conflictingPlugins
commands {
twin {
description = 'Upload and download your config to/from the Triton Web INterface.'
usage = '/twin [code]'
}
}
permissions {
'triton.getflag' {
setDefault('OP')
}
'triton.setlanguage' {
setDefault('TRUE')
}
'triton.setlanguage.others' {
setDefault('OP')
}
'triton.openselector' {
setDefault('TRUE')
}
'triton.reload' {
setDefault('OP')
}
'triton.help' {
setDefault('TRUE')
}
'triton.sign' {
setDefault('OP')
}
'triton.database' {
setDefault('OP')
}
'triton.info' {
setDefault('TRUE')
}
'triton.loglevel' {
setDefault('OP')
}
'twin.upload' {
setDefault('OP')
}
'twin.download' {
setDefault('OP')
}
}
}
bungee {
name = pluginName
version = project.version
description = pluginDescription
author = pluginAuthor
main = 'com.rexcantor64.triton.plugin.BungeePlugin'
}
shadowJar {
getArchiveBaseName().set(rootProject.name)
relocate 'org.bstats', 'com.rexcantor64.triton.metrics'
//relocate 'org.slf4j', 'com.rexcantor64.shaded.slf4j'
relocate 'net.kyori.adventure.text.minimessage', 'com.rexcantor64.shaded.minimessage'
relocate 'com.tananaev.jsonpatch', 'com.rexcantor64.shaded.jsonpatch'
relocate 'com.zaxxer.hikari', 'com.rexcantor64.shaded.hikari'
}