Files
halo-ops-audit/plugin-operation-audit/build.gradle
T

64 lines
1.7 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 前端入口由 ui-plugin.json 清单声明)
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')
// 前端产物带 hash 文件名,先清空目标目录避免历史版本残留进 jar
doFirst {
delete layout.buildDirectory.dir('resources/main/console')
}
}
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'
}