Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Updated UI gradle tasks

Rich Turner9340d6371a22
diff --git a/project.gradle b/project.gradle
index bd7a51ca0..33d764fcd 100644
--- a/project.gradle
+++ b/project.gradle
@@ -63,13 +63,16 @@ ext.npmCommand = {
task yarnInstall(type: Exec){
commandLine npmCommand("yarn"), "install"
}
+task yarnInstallForce(type: Exec){
+ commandLine npmCommand("yarn"), "install", "--force"
+}
// Add npm tasks
task npmInstall(type: Exec){
- // Use yarn
- commandLine npmCommand("yarn"), "install"
+ commandLine npmCommand("npm"), "install"
}
task npmClean(type: Exec){
+ dependsOn tasks.getByPath(":yarnInstall")
commandLine npmCommand("npm"), "run-script", "clean"
}
task npmBuild(type: Exec){
@@ -77,12 +80,15 @@ task npmBuild(type: Exec){
commandLine npmCommand("npm"), "run-script", "build"
}
task npmTest(type: Exec){
+ dependsOn tasks.getByPath(":yarnInstall")
commandLine npmCommand("npm"), "run-script", "test"
}
task npmServe(type: Exec){
+ dependsOn tasks.getByPath(":yarnInstall")
commandLine npmCommand("npm"), "run-script", "serve"
}
task npmServeProduction(type: Exec){
+ dependsOn tasks.getByPath(":yarnInstall")
commandLine npmCommand("npm"), "run-script", "serveProduction"
}