forked from mirror/BlueMap
45 lines
890 B
Groovy
45 lines
890 B
Groovy
plugins {
|
|
id "com.github.node-gradle.node" version "3.0.1"
|
|
}
|
|
|
|
dependencies {
|
|
api 'com.mojang:brigadier:1.0.17'
|
|
|
|
api project(':BlueMapCore')
|
|
api project(':BlueMapAPI')
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
node {
|
|
version = '14.16.1'
|
|
download = true
|
|
nodeProjectDir = file("BlueMapVue/")
|
|
}
|
|
|
|
task cleanWebapp(type: Delete) {
|
|
delete 'BlueMapVue/dist'
|
|
}
|
|
|
|
task buildWebapp(type: NpmTask) {
|
|
dependsOn 'cleanWebapp'
|
|
dependsOn 'npmInstall'
|
|
args = ['run', 'build']
|
|
}
|
|
|
|
task zipWebapp(type: Zip) {
|
|
dependsOn 'buildWebapp'
|
|
from fileTree('BlueMapVue/dist/')
|
|
archiveFileName.set('webapp.zip')
|
|
destinationDirectory.set(file('src/main/resources/de/bluecolored/bluemap/'))
|
|
outputs.upToDateWhen { false }
|
|
}
|
|
|
|
//always update the zip before build
|
|
processResources.dependsOn(zipWebapp)
|
|
|