generated from halo-dev/plugin-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
63 lines (51 loc) · 1.48 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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.revealjs'
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")
}