Skip to content

armgit / core

Public Imported from GitHub
0

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

995 B
Raw Blame
tasks.register('copyMdiFont', Exec) {
  dependsOn getYarnInstallTask()
  // Using yarn throws an error relating to node_module resolution
  commandLine npmCommand("npm"), "run", "copyMdiFont"
}

tasks.register('clean', Delete) {
  delete layout.buildDirectory
}

tasks.register('npmAnalyze', Exec) {
  mustRunAfter npmClean
  dependsOn getYarnInstallTask()
  commandLine npmCommand("yarn"), "run", "analyze"
}

tasks.register('prepareUi') {
  dependsOn clean, npmAnalyze, npmPrepare
}

tasks.register('publishUi') {
  dependsOn clean, npmPublish
}

tasks.register('installDist', Copy) {
  dependsOn getYarnInstallTask(), copyMdiFont, npmAnalyze
  tasks.getByPath(":ui:app:shared:generateSources").dependsOn it
  from "${layout.buildDirectory.get()}/Material Design Icons"
  into "${project(':ui:app:shared').projectDir}/fonts/Material Design Icons"
}

tasks.register('npmBuild', Exec) {
  mustRunAfter npmClean
  dependsOn getYarnInstallTask()
  commandLine npmCommand("yarn"), "run", "build"
}