-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
81 lines (71 loc) · 2.9 KB
/
build.gradle
File metadata and controls
81 lines (71 loc) · 2.9 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
plugins {
id 'java'
id 'xyz.jpenilla.run-velocity' version '2.3.1'
id 'xyz.jpenilla.run-paper' version '2.3.1'
}
group = 'org.zeroBzeroT'
version = "${project.plugin_version}"
description = 'A Velocity plugin for the hover player list in the server list.'
repositories {
mavenCentral()
maven { url 'https://repo.velocitypowered.com/snapshots/' }
maven {
url = 'https://repo.papermc.io/repository/maven-public/'
content {
includeGroup 'com.velocitypowered'
}
}
}
dependencies {
compileOnly group: 'com.velocitypowered', name: 'velocity-api', version: "${project.velocity_api_version}"
annotationProcessor group: 'com.velocitypowered', name: 'velocity-api', version: "${project.velocity_api_version}"
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
}
tasks.withType(JavaCompile).configureEach {
it.sourceCompatibility = it.targetCompatibility = JavaVersion.toVersion(21)
it.options.release = 21
it.options.encoding = 'UTF-8'
}
processResources {
filteringCharset "UTF-8"
filesMatching("velocity-plugin.json") {
filter { line -> line.replace("@VERSION@", project.version) }
filter { line -> line.replace("@DESCRIPTION@", project.description) }
}
}
// put jar artifact in build/dist/
jar.destinationDirectory.set(layout.buildDirectory.dir('dist'))
// test setup
runPaper.disablePluginJarDetection()
tasks {
runVelocity {
runDirectory = layout.projectDirectory.dir('run').dir('proxy')
dependsOn('build')
velocityVersion("${project.velocity_api_version}")
downloadPlugins {
url("https://github.com/ViaVersion/ViaBackwards/releases/download/5.3.2/ViaBackwards-5.3.2.jar")
url("https://github.com/ViaVersion/ViaVersion/releases/download/5.3.2/ViaVersion-5.3.2.jar")
url("https://github.com/zeroBzeroT/AnarchyQueue/releases/download/3.0.8/AnarchyQueue-3.0.8-INDEV.jar")
}
}
tasks.register('runServerMain', runServer.getClass() as Class<Task>) {
minecraftVersion("${project.minecraft_version}")
systemProperty('com.mojang.eula.agree', 'true')
systemProperty('Paper.skipServerPropertiesComments', 'true')
runDirectory = layout.projectDirectory.dir('run').dir('main')
dependsOn('build')
}
tasks.register('runServerQueue', runServer.getClass() as Class<Task>) {
minecraftVersion("${project.minecraft_version}")
systemProperty('com.mojang.eula.agree', 'true')
systemProperty('Paper.skipServerPropertiesComments', 'true')
runDirectory = layout.projectDirectory.dir('run').dir('queue')
downloadPlugins {
url("https://github.com/zeroBzeroT/QueuePlugin/releases/download/v3.0.0/QueuePlugin-3.0.0+1.21-paper.jar")
url("https://github.com/dmulloy2/ProtocolLib/releases/download/5.3.0/ProtocolLib.jar")
}
dependsOn('build')
}
}