Files
MoonBridge/settings.gradle.kts
layue13andClaude Opus 5.5 789648c82f refactor: 仓库根目录按用途分组
- proxy/:core、plugin-api、luckperms 及其上游子模块 vendor/luckperms
- messaging/、backend/ 保持在根目录(messaging 是代理与后端共用的 API)
- build-logic/(原 proxy-build-logic)
- testing/:smoke/ 与 benchmarks/,不进入发行物

Gradle 项目名不变(settings.gradle.kts 映射目录),任务路径与 Maven 坐标照旧。
脚本的仓库根定位、文档与记录中的链接同步更新。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 14:34:01 +08:00

51 lines
1.7 KiB
Kotlin

pluginManagement {
includeBuild("build-logic")
repositories {
gradlePluginPortal()
mavenCentral()
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven {
url = uri("https://repo.lucko.me/")
content { includeGroup("me.lucko.configurate") }
}
maven {
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
content { includeGroup("org.spigotmc") }
}
}
}
rootProject.name = "moonbridge"
// Project names (and so task paths and Maven artifact IDs) stay flat; the directories group them:
// proxy/ for the proxy side, messaging/ for the API shared with backends, backend/ for the Bukkit host.
fun module(name: String, dir: String) {
include(name)
project(":$name").projectDir = file(dir)
}
module("proxy-core", "proxy/core")
module("proxy-plugin-api", "proxy/plugin-api")
module("messaging", "messaging")
module("backend", "backend")
// The LuckPerms platform plugin compiles LuckPerms itself from the proxy/vendor/luckperms submodule, which is
// slow and pulls a large dependency tree, so it is opt-in: pass -Pluckperms (CI and release builds do).
if (providers.gradleProperty("luckperms").map { it != "false" }.getOrElse(false)) {
check(file("proxy/vendor/luckperms/build.gradle").isFile) {
"-Pluckperms needs the LuckPerms sources: run git submodule update --init --recursive"
}
includeBuild("proxy/luckperms/upstream-build")
module("luckperms-moonbridge", "proxy/luckperms")
}