61 lines
1.1 KiB
Groovy
61 lines
1.1 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id "io.freefair.lombok" version "8.14"
|
|
id "com.github.node-gradle.node" version "7.1.0"
|
|
id "run.halo.plugin.devtools" version "0.6.2"
|
|
}
|
|
|
|
group 'run.halo.comment.widget'
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.encoding = "UTF-8"
|
|
options.release = 21
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation platform('run.halo.tools.platform:plugin:2.21.0')
|
|
compileOnly 'run.halo.app:api'
|
|
|
|
testImplementation 'run.halo.app:api'
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
node {
|
|
nodeProjectDir = file("${project.projectDir}")
|
|
}
|
|
|
|
tasks.register('buildFrontend', PnpmTask) {
|
|
args = ['build']
|
|
dependsOn('installDepsForUI')
|
|
}
|
|
|
|
tasks.register('installDepsForUI', PnpmTask) {
|
|
args = ['install']
|
|
}
|
|
|
|
build {
|
|
// build frontend before build
|
|
tasks.named('compileJava').configure {
|
|
dependsOn('buildFrontend')
|
|
}
|
|
}
|
|
|
|
halo {
|
|
version = "2.21.6"
|
|
debug = true
|
|
}
|