From 7664c1cf60dc6abef2ef666dfd35706b31e26435 Mon Sep 17 00:00:00 2001 From: Layue13 Date: Thu, 22 Oct 2026 14:19:36 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E4=BB=A3=E7=90=86=E5=8F=91=E8=A1=8C?= =?UTF-8?q?=E5=8C=85=E5=8F=AA=E4=BF=9D=E7=95=99=E8=BF=90=E8=A1=8C=E6=89=80?= =?UTF-8?q?=E9=9C=80=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 发行包根目录去掉 docs/、smoke/results/、benchmarks/results/ 和 backend/, 只剩 bin/、lib/、config/、README(-Pluckperms 时另有 plugins/)。 后端 jar 已由 release 单独放在 build/release/backend/;channel-java8 烟测改为 从 backend/build/libs 取后端 jar。文档同步。 Co-Authored-By: Claude Opus 5.5 --- docs/publishing.md | 2 +- docs/release-layout.md | 2 +- proxy-core/build.gradle.kts | 14 ++------------ smoke/channel-java8.ps1 | 4 ++-- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/docs/publishing.md b/docs/publishing.md index abfe3dc..6af4070 100644 --- a/docs/publishing.md +++ b/docs/publishing.md @@ -61,4 +61,4 @@ dependencies { .\bin\moonbridge.bat --config .\config\moonbridge.yml ``` -Linux/macOS 使用 `bin/moonbridge`。发行包根目录还带有 README、`docs/`、`smoke/results/` 和 `benchmarks/results/`,这些随包文档和证据记录可离线阅读。指向源码、测试和脚本的链接需要另有仓库 checkout;配置模板位于发行包 `config/` 目录。 +Linux/macOS 使用 `bin/moonbridge`。发行包根目录只有运行需要的内容:`bin/` 启动脚本、`lib/` 依赖、`config/` 配置模板、README,以及带 `-Pluckperms` 构建时的 `plugins/`。文档、验收与基准记录留在仓库里;后端宿主 jar 不在代理包内,见[发行物与安装位置](release-layout.md)。 diff --git a/docs/release-layout.md b/docs/release-layout.md index f0d14d1..b6e7a52 100644 --- a/docs/release-layout.md +++ b/docs/release-layout.md @@ -4,7 +4,7 @@ | 路径 | 是什么 | 装在哪里 | | --- | --- | --- | -| `server/moonbridge-<版本>.zip` | 代理发行包:`bin/` 启动脚本、`lib/`、`config/` 示例配置、`docs/`;带 `-Pluckperms` 构建时 `plugins/` 里含 LuckPerms 平台插件 | 代理服务器,解压后用 JDK 25 运行 `bin/moonbridge --config config/moonbridge.yml` | +| `server/moonbridge-<版本>.zip` | 代理发行包:`bin/` 启动脚本、`lib/`、`config/` 示例配置、README;带 `-Pluckperms` 构建时 `plugins/` 里含 LuckPerms 平台插件 | 代理服务器,解压后用 JDK 25 运行 `bin/moonbridge --config config/moonbridge.yml` | | `backend/moonbridge-backend-<版本>.jar` | 后端共享宿主 `MoonBridgeBackend`(Bukkit/Uranium 插件,Java 8),内含消息 API 与控制通道客户端 | 每台后端服务器的 `plugins/`;后端业务插件对它 `compileOnly` 并在 `plugin.yml` 里 `depend: [MoonBridgeBackend]` | | `client/moonbridgews-<版本>.jar` | 1.7.10 Forge WebSocket 客户端 mod | 玩家客户端 `mods/`,另需 UniMixins;只在使用 `ws://`/`wss://` 地址时需要 | diff --git a/proxy-core/build.gradle.kts b/proxy-core/build.gradle.kts index e2a7d18..b326098 100644 --- a/proxy-core/build.gradle.kts +++ b/proxy-core/build.gradle.kts @@ -150,6 +150,8 @@ tasks.jar { distributions { main { + // Only what the proxy needs to run. Docs and test records stay in the repository, and the + // backend jar ships separately in build/release/backend (see docs/release-layout.md). contents { from(rootProject.file("README.md")) if (luckPerms != null) { @@ -157,21 +159,9 @@ distributions { into("plugins") } } - from(rootProject.file("docs")) { - into("docs") - } - from(rootProject.file("smoke/results")) { - into("smoke/results") - } - from(rootProject.file("benchmarks/results")) { - into("benchmarks/results") - } from("src/main/resources/config") { into("config") } - from(project(":backend").tasks.named("jar")) { - into("backend") - } } } } diff --git a/smoke/channel-java8.ps1 b/smoke/channel-java8.ps1 index 0579d70..e4f262c 100644 --- a/smoke/channel-java8.ps1 +++ b/smoke/channel-java8.ps1 @@ -7,9 +7,9 @@ $repo = Split-Path -Parent $PSScriptRoot $fixtureClasses = Join-Path $repo 'build/channel-smoke/router' $probeClasses = Join-Path $repo 'build/channel-smoke/probe' $proxyClasspath = Join-Path $repo 'proxy-core/build/install/moonbridge/lib/*' -$backendClasspath = Join-Path $repo 'proxy-core/build/install/moonbridge/backend/*' +$backendClasspath = Join-Path $repo 'backend/build/libs/*' if (-not (Test-Path (Join-Path $repo 'proxy-core/build/install/moonbridge/lib'))) { - throw 'Run gradlew :proxy-core:installDist first.' + throw 'Run gradlew :proxy-core:installDist :backend:jar first.' } New-Item -ItemType Directory -Force $fixtureClasses, $probeClasses | Out-Null & (Join-Path $Java25Home 'bin/javac.exe') -cp $proxyClasspath -d $fixtureClasses (Join-Path $PSScriptRoot 'ChannelRouterFixture.java')