2021-03-18 22:55:07 +01:00
|
|
|
plugins {
|
2021-04-24 19:59:36 +02:00
|
|
|
id "com.github.node-gradle.node" version "3.0.1"
|
2021-03-18 22:55:07 +01:00
|
|
|
}
|
|
|
|
|
2020-01-13 17:13:20 +01:00
|
|
|
dependencies {
|
2021-05-16 18:13:30 +02:00
|
|
|
api 'com.mojang:brigadier:1.0.17'
|
|
|
|
|
|
|
|
api project(':BlueMapCore')
|
|
|
|
api project(':BlueMapAPI')
|
2021-04-24 19:59:36 +02:00
|
|
|
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
|
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
2020-01-13 17:13:20 +01:00
|
|
|
}
|
2020-05-10 01:28:09 +02:00
|
|
|
|
2021-03-18 22:55:07 +01:00
|
|
|
node {
|
2021-04-24 19:59:36 +02:00
|
|
|
version = '14.16.1'
|
2021-03-18 22:55:07 +01:00
|
|
|
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/')
|
2021-05-16 18:13:30 +02:00
|
|
|
archiveFileName.set('webapp.zip')
|
|
|
|
destinationDirectory.set(file('src/main/resources/de/bluecolored/bluemap/'))
|
2021-03-18 22:55:07 +01:00
|
|
|
outputs.upToDateWhen { false }
|
|
|
|
}
|
|
|
|
|
|
|
|
//always update the zip before build
|
|
|
|
processResources.dependsOn(zipWebapp)
|
|
|
|
|