- AuditLog Extension(group audit.example.com 占位)+ AuditLogSpec,字段与产品设计 4.1 一一对应 - 操作时间复用 metadata.creationTimestamp(D3) - start() 注册 6 个业务索引(username/resourceType/method/statusCode/resourceName/path),stop() 注销 - 资源名称/路径索引用于关键字模糊筛选(QueryFactory.contains 需索引字段) - 生命周期测试覆盖注册索引清单与注销
60 lines
1.5 KiB
Groovy
60 lines
1.5 KiB
Groovy
plugins {
|
||
id 'java'
|
||
id 'io.freefair.lombok' version '9.2.0'
|
||
id "run.halo.plugin.devtools" version "0.8.0"
|
||
}
|
||
|
||
group = 'run.halo.operationaudit'
|
||
|
||
repositories {
|
||
mavenCentral()
|
||
}
|
||
|
||
dependencies {
|
||
implementation platform('run.halo.tools.platform:plugin:2.26.0')
|
||
compileOnly 'run.halo.app:api'
|
||
|
||
testImplementation 'run.halo.app:api'
|
||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||
testImplementation 'io.projectreactor:reactor-test'
|
||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||
}
|
||
|
||
java {
|
||
toolchain {
|
||
languageVersion = JavaLanguageVersion.of(21)
|
||
}
|
||
}
|
||
|
||
tasks.withType(JavaCompile).configureEach {
|
||
options.encoding = 'UTF-8'
|
||
options.release = 21
|
||
}
|
||
|
||
test {
|
||
useJUnitPlatform()
|
||
testLogging {
|
||
events 'passed', 'skipped', 'failed'
|
||
}
|
||
}
|
||
|
||
// 将 ui 子项目构建产物打包进插件 jar 的 console/ 目录(Console 前端入口 main.js)
|
||
tasks.register('processUiResources', Copy) {
|
||
from project(':ui').layout.buildDirectory.dir('dist')
|
||
into layout.buildDirectory.dir('resources/main/console')
|
||
dependsOn project(':ui').tasks.named('assemble')
|
||
shouldRunAfter tasks.named('processResources')
|
||
}
|
||
|
||
tasks.named('classes') {
|
||
dependsOn tasks.named('processUiResources')
|
||
}
|
||
|
||
tasks.named('generatePluginComponentsIdx') {
|
||
notCompatibleWithConfigurationCache('This task invokes "Task.project" at execution time, which is not supported with configuration cache.')
|
||
}
|
||
|
||
halo {
|
||
version = '2.26.1'
|
||
}
|