feat: 插件骨架(里程碑 1)

- Gradle 工程:devtools 0.8.0 + 平台 BOM 2.26.0,JDK 21 toolchain
- plugin.yaml:operation-audit,requires >=2.26.0
- OperationAuditPlugin 入口(@Component)
- ui 子项目:Vue 3 + Vite 6 + @halo-dev/components 2.26.0,占位页 + 菜单注册,npm 构建(legacy-peer-deps 对齐 pnpm 行为)
- ./gradlew build 通过,jar 内含 plugin.yaml / console 前端产物 / 组件索引
This commit is contained in:
2026-11-21 16:07:37 +08:00
parent a14cd433b6
commit 5e6ee00268
19 changed files with 2677 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
plugins {
id 'base'
id "com.github.node-gradle.node" version "7.1.0"
}
group = 'run.halo.operationaudit.ui'
node {
// 使用系统已安装的 Node/npm,不额外下载
download = false
}
// 前端构建(npm run build = 类型检查 + vite 打包,产物输出到 build/dist)
tasks.register('buildFrontend', NpmTask) {
group = 'build'
description = 'Builds the Console UI bundle.'
args = ['run', 'build']
inputs.files(
fileTree('src'),
fileTree('public'),
file('package.json'),
file('vite.config.ts'),
file('tsconfig.json'),
)
outputs.dir(layout.buildDirectory.dir('dist'))
dependsOn tasks.named('npmInstall')
}
tasks.named('check') {
dependsOn tasks.named('buildFrontend')
}
tasks.named('assemble') {
dependsOn tasks.named('buildFrontend')
}