chore: 发布验收 P2 项——UI 产物迁至 ui/ 规范目录,补齐 manifest 元数据

- build.gradle: processUiResources 输出目录 console/ -> ui/(目标 Halo >=2.25.0 官方规范位置),
  doFirst 同时清理旧构建残留的 console/ 目录;vite.config.ts 注释同步
- plugin.yaml: 新增 spec.logo(logo.svg)/homepage/repo/issues/author.website 与 license.url,
  logo.svg 以相对路径随包内置(官方插件同款方式)
- 已验证: ./gradlew check 全绿(后端 270 + UI 69),clean build -Pversion=0.1.0
  三处版本一致(JAR 文件名/plugin.yaml spec.version/Manifest Implementation-Version 均 0.1.0),
  ui-plugin.json 声明的入口与样式均存在于 JAR 内
This commit is contained in:
2026-11-22 22:53:36 +08:00
parent b6a21dfaa7
commit 81693e4778
4 changed files with 35 additions and 4 deletions
+6 -3
View File
@@ -38,14 +38,17 @@ test {
} }
} }
// 将 ui 子项目构建产物打包进插件 jar 的 console/ 目录(Console 前端入口由 ui-plugin.json 清单声明) // 将 ui 子项目构建产物打包进插件 jar 的 ui/ 目录(Console 前端入口由 ui-plugin.json 清单声明)。
// 目标 Halo >=2.25.0 时 ui/ 是官方规范输出位置;console/ 为旧项目兼容回退,本插件不再使用。
tasks.register('processUiResources', Copy) { tasks.register('processUiResources', Copy) {
from project(':ui').layout.buildDirectory.dir('dist') from project(':ui').layout.buildDirectory.dir('dist')
into layout.buildDirectory.dir('resources/main/console') into layout.buildDirectory.dir('resources/main/ui')
dependsOn project(':ui').tasks.named('assemble') dependsOn project(':ui').tasks.named('assemble')
shouldRunAfter tasks.named('processResources') shouldRunAfter tasks.named('processResources')
// 前端产物带 hash 文件名,先清空目标目录避免历史版本残留进 jar // 前端产物带 hash 文件名,先清空目标目录避免历史版本残留进 jar;
// 同时清掉旧构建可能残留的 console/ 目录,防止过期产物被打进 jar
doFirst { doFirst {
delete layout.buildDirectory.dir('resources/main/ui')
delete layout.buildDirectory.dir('resources/main/console') delete layout.buildDirectory.dir('resources/main/console')
} }
} }
@@ -0,0 +1,21 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
<!-- 操作审计插件 logo:审计清单(带勾选记录的文档) -->
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#4f6ef7"/>
<stop offset="1" stop-color="#2743c8"/>
</linearGradient>
</defs>
<rect x="4" y="4" width="120" height="120" rx="28" fill="url(#bg)"/>
<!-- 文档主体 -->
<rect x="34" y="30" width="60" height="68" rx="10" fill="#ffffff" opacity="0.96"/>
<!-- 顶部夹子 -->
<rect x="50" y="22" width="28" height="14" rx="7" fill="#dbe3ff"/>
<!-- 记录行:条目 + 勾选 -->
<circle cx="48" cy="52" r="5" fill="#2743c8"/>
<rect x="58" y="49" width="26" height="6" rx="3" fill="#b9c4f5"/>
<circle cx="48" cy="68" r="5" fill="#2743c8"/>
<rect x="58" y="65" width="26" height="6" rx="3" fill="#b9c4f5"/>
<path d="M43 85 l6 7 l12 -14" stroke="#2743c8" stroke-width="6" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="64" y="82" width="20" height="6" rx="3" fill="#b9c4f5"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -7,9 +7,15 @@ spec:
requires: ">=2.26.0" requires: ">=2.26.0"
author: author:
name: Guichumo name: Guichumo
website: http://101.43.163.221:3000/836061373/halo-ops-audit
logo: logo.svg
homepage: http://101.43.163.221:3000/836061373/halo-ops-audit
repo: http://101.43.163.221:3000/836061373/halo-ops-audit
issues: http://101.43.163.221:3000/836061373/halo-ops-audit/issues
displayName: "操作审计" displayName: "操作审计"
description: "记录后台写操作与登录事件,回答谁、在什么时候、对什么资源、做了什么操作、结果如何。" description: "记录后台写操作与登录事件,回答谁、在什么时候、对什么资源、做了什么操作、结果如何。"
settingName: operation-audit-settings settingName: operation-audit-settings
configMapName: operation-audit-configmap configMapName: operation-audit-configmap
license: license:
- name: "GPL-3.0" - name: "GPL-3.0"
url: "https://www.gnu.org/licenses/gpl-3.0.html"
+2 -1
View File
@@ -1,7 +1,8 @@
import { viteConfig } from '@halo-dev/ui-plugin-bundler-kit/vite' import { viteConfig } from '@halo-dev/ui-plugin-bundler-kit/vite'
import { fileURLToPath, URL } from 'url' import { fileURLToPath, URL } from 'url'
// 官方 ui-plugin-bundler-kit 负责外部化 vue / @halo-dev/* 依赖并输出 console/main.js // 官方 ui-plugin-bundler-kit 负责外部化 vue / @halo-dev/* 依赖并输出 ESM 产物
// (requires >=2.26.0 触发 auto 判定,由 Gradle 打包进插件 jar 的 ui/ 目录)
export default viteConfig({ export default viteConfig({
vite: { vite: {
resolve: { resolve: {