diff --git a/build.gradle b/build.gradle index a8a8aa1..a0fcac6 100644 --- a/build.gradle +++ b/build.gradle @@ -39,10 +39,10 @@ apply from: "gradle/docker.gradle" apply from: "gradle/sonar.gradle" //jhipster-needle-gradle-apply-from - JHipster will add additional gradle scripts to be applied here -if (project.hasProperty("prod")) { - apply from: "gradle/profile_prod.gradle" -} else { +if (project.hasProperty("dev")) { apply from: "gradle/profile_dev.gradle" +} else { + apply from: "gradle/profile_prod.gradle" } if (project.hasProperty("war")) { diff --git a/gradle/profile_dev.gradle b/gradle/profile_dev.gradle index a5782c6..b27c8e5 100644 --- a/gradle/profile_dev.gradle +++ b/gradle/profile_dev.gradle @@ -29,8 +29,12 @@ bootRun { args = [] } +task looseInstall(type: NpmTask) { + args = ["install"] +} + task buildFront(type: NpmTask) { - dependsOn npmInstall + dependsOn looseInstall args = ["run", "build:dev"] } diff --git a/gradle/profile_prod.gradle b/gradle/profile_prod.gradle index e557738..3b20204 100644 --- a/gradle/profile_prod.gradle +++ b/gradle/profile_prod.gradle @@ -18,8 +18,12 @@ bootRun { args = [] } +task strictInstall(type: NpmTask) { + args = ["ci"] +} + task buildFront(type: NpmTask) { - dependsOn npmInstall + dependsOn strictInstall args = ["run", "build"] }