mirror of
https://github.com/halo-dev/plugin-starter.git
synced 2025-10-13 22:56:50 +00:00
72 lines
1.7 KiB
Groovy
72 lines
1.7 KiB
Groovy
plugins {
|
|
id 'org.springframework.boot' version '3.0.0-M3'
|
|
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
|
|
id "com.github.node-gradle.node" version "3.3.0"
|
|
id "io.github.guqing.plugin-development" version "0.0.3-SNAPSHOT"
|
|
id 'java'
|
|
}
|
|
|
|
group 'run.halo.starter'
|
|
version '0.0.1-SNAPSHOT'
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
repositories {
|
|
maven { url 'https://repo.spring.io/milestone' }
|
|
mavenCentral()
|
|
}
|
|
|
|
bootJar {
|
|
enabled = false
|
|
}
|
|
|
|
jar {
|
|
enabled = true
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
manifest.attributes(
|
|
'Plugin-Version': "${project.version}",
|
|
)
|
|
from {
|
|
configurations.runtimeClasspath.collect {
|
|
it.isDirectory() ? it : zipTree(it)
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly "io.swagger.core.v3:swagger-core-jakarta:2.2.0"
|
|
compileOnly 'org.springframework.boot:spring-boot-starter-webflux'
|
|
compileOnly 'org.pf4j:pf4j:3.6.0'
|
|
|
|
compileOnly files("lib/halo-2.0.0-SNAPSHOT-plain.jar")
|
|
|
|
compileOnly 'org.projectlombok:lombok'
|
|
annotationProcessor 'org.projectlombok:lombok'
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
|
|
}
|
|
|
|
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")
|
|
}
|