mirror of
https://github.com/halo-dev/plugin-starter.git
synced 2025-10-13 22:56:50 +00:00

### What this PR does? 优化项目配置 - 使用 Halo plugin maven 依赖替换原先 lib 依赖,为了此依赖必须将 gradle 升级至 8 版本 - 将 resources/console 加入到 .gitignore 中 - 增加了 .editconfig 配置 ```release-note None ```
60 lines
1.4 KiB
Groovy
60 lines
1.4 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id "com.github.node-gradle.node" version "3.3.0"
|
|
id "io.freefair.lombok" version "8.0.1"
|
|
id "io.github.guqing.plugin-development" version "0.0.6-SNAPSHOT"
|
|
}
|
|
|
|
group 'run.halo.starter'
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'https://s01.oss.sonatype.org/content/repositories/releases' }
|
|
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
|
|
maven { url 'https://repo.spring.io/milestone' }
|
|
}
|
|
|
|
jar {
|
|
enabled = true
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
manifest.attributes('Plugin-Version': "${project.version}",)
|
|
from {
|
|
configurations.runtimeClasspath.collect {
|
|
it.isDirectory() ? it : zipTree(it)
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation platform('run.halo.tools.platform:plugin:2.5.0-SNAPSHOT')
|
|
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}/console")
|
|
}
|
|
|
|
task buildFrontend(type: NpxTask) {
|
|
command = 'pnpm'
|
|
args = ['build']
|
|
}
|
|
|
|
task pnpmInstall(type: NpxTask) {
|
|
command = "pnpm"
|
|
args = ["install"]
|
|
}
|
|
|
|
build {
|
|
// build frontend before build
|
|
tasks.getByName('compileJava').dependsOn('buildFrontend')
|
|
tasks.getByName("buildFrontend").dependsOn("pnpmInstall")
|
|
}
|