diff options
| author | Sho Sakuma <me@m1sk9.dev> | 2026-08-02 18:34:21 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-02 18:34:21 +0900 |
| commit | 1dd2787059331db57049cb1dac8a38ceea859992 (patch) | |
| tree | d5592ec0a9b92bc792301c0792baa8c0eac97111 | |
| parent | 45c29405be5169e088023aa01cde50467f3eabed (diff) | |
| download | LunaticChat-1dd2787059331db57049cb1dac8a38ceea859992.tar.gz LunaticChat-1dd2787059331db57049cb1dac8a38ceea859992.tar.bz2 LunaticChat-1dd2787059331db57049cb1dac8a38ceea859992.zip | |
feat(velocity)!: build against Velocity API 4.0.0 and drop Velocity 3.5.x support
Velocity moved to the 4.x generation while platform-velocity still compiled
against 3.5.1, so the debug environment had to pin an older proxy than the one
most users now run.
The migration needed no source changes. Comparing every one of the 213 classes in
the API jar with javap shows 4.0.0 is identical to 3.5.1 in its public
signatures; the supported protocol range is unchanged too. The one real
difference is the POM, which moves adventure-bom from 4.26.1 to 5.2.0.
Support for 3.5.x is dropped even though the JAR would still load there, because
keeping it meant Adventure 4.26.1 could be the runtime and engine had to stay
inside the API surface both Adventure majors share -- a constraint no build step
could check. Narrowing to 4.x makes every supported runtime ship Adventure 5.2.0,
matching what engine already compiles against, so the constraint is gone rather
than merely documented. Nothing enforces the requirement in code, matching how
dropping 3.4.0 was handled in v1.1.0.
Also drops two dead dependencies: kaml, declared but never imported, worth about
1 MB of shaded JAR, and the velocity-api annotationProcessor, which does nothing
without Java sources or kapt.
| -rw-r--r-- | CHANGELOG.md | 6 | ||||
| -rw-r--r-- | engine/build.gradle.kts | 4 | ||||
| -rw-r--r-- | gradle.properties | 2 | ||||
| -rw-r--r-- | platform-velocity/build.gradle.kts | 6 | ||||
| -rw-r--r-- | website/.vitepress/theme/components/DownloadCard.vue | 4 | ||||
| -rw-r--r-- | website/src/docs/developers/resource.md | 2 | ||||
| -rw-r--r-- | website/src/ja/docs/developers/resource.md | 2 |
7 files changed, 14 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5596aa8..54a1516 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ - Added cross-server direct messaging functionality - Fixed a bug where the player argument for `/tell` used partial matching (we switched from the old Bukkit API to the new API) +#### Velocity: v1.2.0 + +- Velocity 4.0.0 is now supported. + - Support for Velocity 3.5.x has been dropped. +- Removed an unused YAML dependency, shrinking the Velocity JAR by roughly 1 MB. + ### v1.2.2 This release includes updates to the Velocity version. diff --git a/engine/build.gradle.kts b/engine/build.gradle.kts index 854d965..bcb7eb6 100644 --- a/engine/build.gradle.kts +++ b/engine/build.gradle.kts @@ -11,9 +11,7 @@ dependencies { api("io.ktor:ktor-client-cio:3.5.2") // Adventure API (provided by platform implementations) - // Pinned to the Paper-bundled version. Velocity (velocity-api 3.5.1) still ships Adventure 4.26.1, - // so engine must stay within the API surface both versions share -- currently just the Component type. - // Once platform-velocity moves to velocity-api 4.x (Adventure 5.2.0), this constraint goes away. + // Matches what every supported platform ships: Paper 26.2 and Velocity 4.x both bundle 5.2.0. compileOnly("net.kyori:adventure-api:5.2.0") testImplementation("net.kyori:adventure-api:5.2.0") diff --git a/gradle.properties b/gradle.properties index ae2b5f7..517ed8e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,4 +6,4 @@ org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled # Platform versions (can be released independently) paperVersion=1.3.0 -velocityVersion=1.1.0 +velocityVersion=1.2.0 diff --git a/platform-velocity/build.gradle.kts b/platform-velocity/build.gradle.kts index f4c028b..3cd8c2d 100644 --- a/platform-velocity/build.gradle.kts +++ b/platform-velocity/build.gradle.kts @@ -17,12 +17,10 @@ dependencies { api(project(":engine")) // Velocity-specific dependencies - compileOnly("com.velocitypowered:velocity-api:3.5.1") - annotationProcessor("com.velocitypowered:velocity-api:3.5.1") - implementation("com.charleskorn.kaml:kaml:0.104.0") // YAML configuration + compileOnly("com.velocitypowered:velocity-api:4.0.0") // Test dependencies - testImplementation("com.velocitypowered:velocity-api:3.5.1") + testImplementation("com.velocitypowered:velocity-api:4.0.0") testImplementation("io.mockk:mockk:1.14.11") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.11.0") } diff --git a/website/.vitepress/theme/components/DownloadCard.vue b/website/.vitepress/theme/components/DownloadCard.vue index af54d10..add8d45 100644 --- a/website/.vitepress/theme/components/DownloadCard.vue +++ b/website/.vitepress/theme/components/DownloadCard.vue @@ -15,7 +15,7 @@ const t = computed(() => requirements: 'Requirements', javaReq: '25 or later', paperReq: '26.2.x or later', - velocityReq: '3.5.x or later', + velocityReq: '4.0.x or later', noRelease: 'No release', releaseDate: 'Release date', fileSize: 'File size', @@ -45,7 +45,7 @@ const t = computed(() => requirements: '動作要件', javaReq: '25 以降', paperReq: '26.2.x 以降', - velocityReq: '3.5.x 以降', + velocityReq: '4.0.x 以降', noRelease: 'リリースなし', releaseDate: 'リリース日', fileSize: 'ファイルサイズ', diff --git a/website/src/docs/developers/resource.md b/website/src/docs/developers/resource.md index ccc9eec..1526cf7 100644 --- a/website/src/docs/developers/resource.md +++ b/website/src/docs/developers/resource.md @@ -11,7 +11,7 @@ A Gradle multi-module setup shares `engine` while building and releasing Paper / - Root `build.gradle.kts` — manages Kotlin 2.4.0 + serialization / Shadow / ktlint / dokka. The JVM target is **JVM_25**. Tests use JUnit Platform + jacoco, with common test dependencies injected into all modules - `engine` — exposes core libraries (serialization / coroutines / ktor) via `api()` to propagate them to the platforms. Adventure is `compileOnly`. A pure library with no Shadow - `platform-paper` — `version = paperVersion`. `api(project(":engine"))`. paper-api as `compileOnly`, KAML + kotlin-reflect as `implementation`. Output is **`LunaticChat-<ver>.jar`** (no classifier; `jar` disabled) -- `platform-velocity` — `version = velocityVersion`. `api(project(":engine"))`. velocity-api as `compileOnly` + `annotationProcessor` (for `@Plugin` processing). Output is **`LunaticChat-<ver>-velocity.jar`** (distinguished by classifier) +- `platform-velocity` — `version = velocityVersion`. `api(project(":engine"))`. velocity-api as `compileOnly`. Output is **`LunaticChat-<ver>-velocity.jar`** (distinguished by classifier) - `dokka` — aggregates engine/paper/velocity and includes the README in the HTML Both platforms' `processResources` compute `version` / `gitCommitHash` / `channel` from the git short hash and `isNightly`, and token-expand them into `paper-plugin.yml` / `velocity-plugin.json` and `build-info.properties`. diff --git a/website/src/ja/docs/developers/resource.md b/website/src/ja/docs/developers/resource.md index 78d6128..b06864a 100644 --- a/website/src/ja/docs/developers/resource.md +++ b/website/src/ja/docs/developers/resource.md @@ -11,7 +11,7 @@ Gradle マルチモジュール構成で,engine を共有しつつ Paper / Vel - ルート `build.gradle.kts` — Kotlin 2.4.0 + serialization / Shadow / ktlint / dokka を管理.JVM ターゲットは **JVM_25**.テストは JUnit Platform + jacoco で,共通テスト依存を全モジュールへ注入 - `engine` — コアライブラリ (serialization / coroutines / ktor) を `api()` で公開しプラットフォームへ伝播.Adventure は `compileOnly`.Shadow を持たない純ライブラリ - `platform-paper` — `version = paperVersion`.`api(project(":engine"))`.paper-api を `compileOnly`,KAML + kotlin-reflect を `implementation`.成果物は **`LunaticChat-<ver>.jar`** (classifier なし,`jar` は無効化) -- `platform-velocity` — `version = velocityVersion`.`api(project(":engine"))`.velocity-api を `compileOnly` + `annotationProcessor` (`@Plugin` 処理用).成果物は **`LunaticChat-<ver>-velocity.jar`** (classifier で区別) +- `platform-velocity` — `version = velocityVersion`.`api(project(":engine"))`.velocity-api を `compileOnly`.成果物は **`LunaticChat-<ver>-velocity.jar`** (classifier で区別) - `dokka` — engine/paper/velocity を集約し HTML に README を include 両プラットフォームの `processResources` は git short hash と `isNightly` から `version` / `gitCommitHash` / `channel` を算出し,`paper-plugin.yml` / `velocity-plugin.json` と `build-info.properties` にトークン展開します. |
