mirror of
https://github.com/halo-dev/plugin-starter.git
synced 2025-10-13 22:56:50 +00:00
64 lines
1.5 KiB
Groovy
64 lines
1.5 KiB
Groovy
plugins {
|
|
id "com.github.node-gradle.node" version "3.3.0"
|
|
id "io.github.guqing.plugin-development" version "0.0.6-SNAPSHOT"
|
|
id 'java'
|
|
}
|
|
|
|
group 'run.halo.starter'
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
repositories {
|
|
maven { url 'https://s01.oss.sonatype.org/content/repositories/releases' }
|
|
maven { url 'https://repo.spring.io/milestone' }
|
|
mavenCentral()
|
|
}
|
|
|
|
jar {
|
|
enabled = true
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
manifest.attributes(
|
|
'Plugin-Version': "${project.version}",
|
|
)
|
|
from {
|
|
configurations.runtimeClasspath.collect {
|
|
it.isDirectory() ? it : zipTree(it)
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly platform("run.halo.dependencies:halo-dependencies:1.0.0")
|
|
|
|
compileOnly files("lib/halo-2.0.0-SNAPSHOT-plain.jar")
|
|
|
|
compileOnly 'org.projectlombok:lombok:1.18.22'
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.22'
|
|
|
|
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")
|
|
}
|