Skip to content

Commit 5f94cde

Browse files
velocity test setup
1 parent 4b1fb06 commit 5f94cde

File tree

6 files changed

+76
-15
lines changed

6 files changed

+76
-15
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,7 @@ bin/
3939
.vscode/
4040

4141
### Mac OS ###
42-
.DS_Store
42+
.DS_Store
43+
44+
### Velocity ###
45+
/run/

.idea/.name

Lines changed: 0 additions & 1 deletion
This file was deleted.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 36 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,50 @@
11
plugins {
22
id 'java'
3+
id 'xyz.jpenilla.run-velocity' version '2.3.1'
34
}
45

56
group = 'org.zeroBzeroT'
6-
version = '2.0-SNAPSHOT'
7+
version = '2.0.0'
8+
description = 'A Velocity plugin for the hover player list in the server list.'
79

810
repositories {
911
mavenCentral()
1012
maven { url 'https://repo.velocitypowered.com/snapshots/' }
1113
}
1214

1315
dependencies {
14-
implementation 'com.velocitypowered:velocity-api:3.1.0'
16+
// Velocity API
17+
// https://repo.papermc.io/service/rest/repository/browse/maven-public/com/velocitypowered/velocity-api/
18+
compileOnly group: 'com.velocitypowered', name: 'velocity-api', version: "3.4.0-SNAPSHOT"
19+
}
20+
21+
java {
22+
toolchain.languageVersion = JavaLanguageVersion.of(21)
23+
}
24+
25+
tasks.withType(JavaCompile).configureEach {
26+
it.sourceCompatibility = it.targetCompatibility = JavaVersion.toVersion(21)
27+
it.options.release = 21
28+
it.options.encoding = 'UTF-8'
29+
}
30+
31+
processResources {
32+
filteringCharset "UTF-8"
33+
filesMatching("velocity-plugin.json") {
34+
filter { line -> line.replace("@VERSION@", project.version) }
35+
filter { line -> line.replace("@DESCRIPTION@", project.description) }
36+
}
1537
}
1638

1739
test {
1840
useJUnitPlatform()
41+
}
42+
43+
tasks {
44+
runVelocity {
45+
runDirectory = layout.projectDirectory.dir('run')
46+
dependsOn('build')
47+
systemProperty('com.mojang.eula.agree', 'true')
48+
velocityVersion("3.4.0-SNAPSHOT")
49+
}
1950
}

src/main/resources/velocity-plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"id": "serverpingplayerlist",
33
"name": "ServerPingPlayerList",
4-
"version": "${version}",
5-
"description": "A Velocity plugin for the hover player list in the server list.",
4+
"version": "@VERSION@",
5+
"description": "@DESCRIPTION@",
66
"authors": [
77
"bierdosenhalter", "A4P5"
88
],

0 commit comments

Comments
 (0)