Initial application generated by JHipster-5.8.2
This commit is contained in:
63
gradle/profile_dev.gradle
Normal file
63
gradle/profile_dev.gradle
Normal file
@ -0,0 +1,63 @@
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
|
||||
apply plugin: 'org.springframework.boot'
|
||||
apply plugin: 'com.moowork.node'
|
||||
|
||||
dependencies {
|
||||
compile "org.springframework.boot:spring-boot-devtools"
|
||||
compile "com.h2database:h2"
|
||||
}
|
||||
|
||||
def profiles = 'dev'
|
||||
if (project.hasProperty('no-liquibase')) {
|
||||
profiles += ',no-liquibase'
|
||||
}
|
||||
if (project.hasProperty('tls')) {
|
||||
profiles += ',tls'
|
||||
}
|
||||
|
||||
springBoot {
|
||||
buildInfo {
|
||||
properties {
|
||||
time = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bootRun {
|
||||
args = []
|
||||
}
|
||||
|
||||
task webpackBuildDev(type: NpmTask) {
|
||||
inputs.files(fileTree('src/main/webapp/'))
|
||||
|
||||
def webpackDevFiles = fileTree('webpack//')
|
||||
webpackDevFiles.exclude('webpack.prod.js')
|
||||
inputs.files(webpackDevFiles)
|
||||
|
||||
outputs.files(fileTree("build/www/"))
|
||||
|
||||
dependsOn npmInstall
|
||||
|
||||
args = ["run", "webpack:build"]
|
||||
}
|
||||
|
||||
task copyIntoStatic (type: Copy) {
|
||||
from 'build/www/'
|
||||
into 'build/resources/main/static'
|
||||
}
|
||||
|
||||
processResources {
|
||||
filesMatching('**/application.yml') {
|
||||
filter {
|
||||
it.replace('#project.version#', version)
|
||||
}
|
||||
filter {
|
||||
it.replace('#spring.profiles.active#', profiles)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
processResources.dependsOn webpackBuildDev
|
||||
copyIntoStatic.dependsOn processResources
|
||||
bootJar.dependsOn copyIntoStatic
|
Reference in New Issue
Block a user