|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import org.gradle.internal.os.OperatingSystem
-
- apply plugin: 'org.springframework.boot'
- apply plugin: 'com.github.node-gradle.gulp'
-
- dependencies {
- compile "org.springframework.boot:spring-boot-devtools"
- }
-
- def profiles = 'dev'
- if (project.hasProperty('no-liquibase')) {
- profiles += ',no-liquibase'
- }
- if (project.hasProperty('tls')) {
- profiles += ',tls'
- }
- if (project.hasProperty('swagger')) {
- profiles += ',swagger'
- }
- bootRun {
- args = []
- }
-
- task copySwaggerDev(type: NpmTask, dependsOn: 'npm_install') {
- inputs.dir("src/main/webapp/")
- inputs.files(fileTree('src/main/webapp/'))
- outputs.dir("build/www/")
- outputs.file("build/www/app/main.bundle.js")
- args = ["run", "copy-swagger"]
- }
-
- war {
- webAppDirName = 'build/www/'
- }
-
- 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 copySwaggerDev
- copyIntoStatic.dependsOn processResources
- bootJar.dependsOn copyIntoStatic
|