Files
halo-dark-mode-plugin/build.gradle
T
Serendipity 2a37c36894 chore: 修正构建配置以支持本机 JDK 25 构建
- 移除 toolchain 约束,改用 options.release = 21 兼容 Halo API
- 通过 gradle.properties 指定本机 JDK 25 路径
- gradle wrapper 切换至腾讯镜像源解决下载超时

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-06 22:48:57 +08:00

50 lines
1.2 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.darkmode'
repositories {
mavenCentral()
}
dependencies {
implementation platform('run.halo.tools.platform:plugin:2.25.0')
compileOnly 'run.halo.app:api'
testImplementation 'run.halo.app:api'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
test {
useJUnitPlatform()
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.release = 21
}
tasks.register('processUiResources', Copy) {
from project(':ui').layout.buildDirectory.dir('dist')
into layout.buildDirectory.dir('resources/main/ui')
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.25'
}