forked from Mindgamesnl/OpenAudioMc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
139 lines (122 loc) · 5.66 KB
/
Copy pathbuild.gradle
File metadata and controls
139 lines (122 loc) · 5.66 KB
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
plugins {
id 'java'
id 'com.gradleup.shadow' version '9.6.1' apply false
}
allprojects {
group = 'com.craftmend.openaudiomc'
version = '6.10.16'
repositories {
mavenCentral()
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url 'https://repo.velocitypowered.com/snapshots/' }
maven { url 'https://repo.spongepowered.org/maven' }
maven { url 'https://jitpack.io' }
maven { url 'https://repo.essentialsx.net/releases/' }
maven { url 'https://repo.papermc.io/repository/maven-public/' }
maven { url 'https://repo.codemc.org/repository/maven-public/' }
maven { url 'https://oss.sonatype.org/content/groups/public/' }
maven { url 'https://maven.enginehub.org/repo/' }
maven { url 'https://ci.mg-dev.eu/plugin/repository/everything' }
maven { url 'https://libraries.minecraft.net/' }
maven { url 'https://repo.essentialsx.net/snapshots/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
gradlePluginPortal()
}
}
subprojects {
apply plugin: 'java'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
// We deliberately target Java 8; don't drown the log in "source value 8 is obsolete"
options.compilerArgs << '-Xlint:-options'
}
}
// Resolves credentials for a maven server, without exploding when the developer
// has no ~/.m2/settings.xml (which is the common case for contributors who only
// ever build, and never publish).
ext.mavenServerCredentials = { String serverId ->
def username = System.getenv("MAVEN_USERNAME") ?: rootProject.findProperty("${serverId}.username")
def password = System.getenv("MAVEN_PASSWORD") ?: rootProject.findProperty("${serverId}.password")
def settingsFile = new File(System.getProperty("user.home"), ".m2/settings.xml")
if ((!username || !password) && settingsFile.exists()) {
try {
def settings = new groovy.xml.XmlSlurper().parse(settingsFile)
def server = settings.servers.server.find { it.id.text() == serverId }
if (server) {
username = username ?: server.username.text()
password = password ?: server.password.text()
}
} catch (Exception e) {
rootProject.logger.warn("Could not read maven credentials for '${serverId}' from ${settingsFile}: ${e.message}")
}
}
return [username: username ?: "", password: password ?: ""]
}
// Version variables (matching Maven properties)
ext {
// Project version
oaVersion = '6.10.11'
// Dev dependencies
lombokVersion = '1.18.46' // 1.18.40+ is required to run on JDK 25
jetbrainsAnnotVersion = '24.1.0'
// Production dependencies
spigotVersion = '1.13.2-R0.1-SNAPSHOT'
okhttpVersion = '4.12.0'
// Deliberately kept on the 3.x API: it is binary compatible with Velocity 4,
// and compiling against it keeps us loadable on 3.x proxies as well.
velocityApiVersion = '3.1.0'
stormVersion = 'e1f961b'
nbtApiVersion = '2.16.0'
lettuceVersion = '6.8.2.RELEASE'
snakeyamlVersion = '2.6'
sqliteJdbcVersion = '3.53.2.1'
// NOTE: socket.io-client is pinned to 1.x on purpose. 2.x speaks the
// Socket.IO v3/v4 protocol, which the OpenAudioMc backend does not accept.
socketIoVersion = '1.0.0'
// Bungeecord dependencies
bungeeProxyVersion = 'b23a51825e'
bungeeProtocolVersion = bungeeProxyVersion
bungeeApiVersion = bungeeProxyVersion
// Integration dependencies
traincartsVersion = '1.15.2-v2-SNAPSHOT'
bkcommonlibVersion = traincartsVersion
litebansVersion = '0.6.1'
essentialsxVersion = '2.19.0-SNAPSHOT'
placeholderapiVersion = '2.11.6'
}
// Common dependencies that can be used by all subprojects
ext.deps = [
// Dev dependencies
lombok: [
compileOnly: "org.projectlombok:lombok:${lombokVersion}",
annotationProcessor: "org.projectlombok:lombok:${lombokVersion}",
testCompileOnly: "org.projectlombok:lombok:${lombokVersion}",
testAnnotationProcessor: "org.projectlombok:lombok:${lombokVersion}"
],
jetbrainsAnnot: "org.jetbrains:annotations-java5:${jetbrainsAnnotVersion}",
// Production dependencies
spigot: "org.spigotmc:spigot-api:${spigotVersion}",
okhttp: "com.squareup.okhttp3:okhttp:${okhttpVersion}",
velocityApi: "com.velocitypowered:velocity-api:${velocityApiVersion}",
storm: "com.github.Mindgamesnl:Storm:${stormVersion}",
nbtApi: "de.tr7zw:item-nbt-api:${nbtApiVersion}",
lettuce: "io.lettuce:lettuce-core:${lettuceVersion}",
snakeyaml: "org.yaml:snakeyaml:${snakeyamlVersion}",
sqliteJdbc: "org.xerial:sqlite-jdbc:${sqliteJdbcVersion}",
socketIo: "io.socket:socket.io-client:${socketIoVersion}",
// BungeeCord dependencies
bungeeProxy: "com.github.spigotmc.bungeecord:bungeecord-proxy:${bungeeProxyVersion}",
bungeeProtocol: "com.github.spigotmc.bungeecord:bungeecord-protocol:${bungeeProtocolVersion}",
bungeeApi: "com.github.spigotmc.bungeecord:bungeecord-api:${bungeeApiVersion}",
// Integration dependencies
traincarts: "com.bergerkiller.bukkit:TrainCarts:${traincartsVersion}",
bkcommonlib: "com.bergerkiller.bukkit:BKCommonLib:${bkcommonlibVersion}",
litebans: "litebans:api:${litebansVersion}",
essentialsx: "net.essentialsx:EssentialsX:${essentialsxVersion}",
placeholderapi: "me.clip:placeholderapi:${placeholderapiVersion}"
]