Files
plugin-starter/build.gradle
Ryan Wang e51643c65c chore: rename to plugin-starter
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-08-29 22:29:03 +08:00

73 lines
1.8 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 'java'
}
group 'run.halo.starter'
version '0.0.1-SNAPSHOT'
sourceCompatibility = JavaVersion.VERSION_17
repositories {
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
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.github.guqing:pluggable-suite:0.0.1-SNAPSHOT'
compileOnly "io.swagger.core.v3:swagger-core-jakarta:2.2.0"
compileOnly 'org.springframework.boot:spring-boot-starter-webflux'
annotationProcessor 'io.github.guqing:pluggable-suite:0.0.1-SNAPSHOT'
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}/admin-frontend")
}
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")
}