build.gradle
58 lines
| 1.0 KiB
| text/x-groovy
|
GroovyLexer
/ playground / build.gradle
|
|
r97 | plugins { | |
| id "org.implab.gradle-typescript" version "1.3.4" | |||
| id "ivy-publish" | |||
| } | |||
| configurations { | |||
| npmLocal | |||
| } | |||
| dependencies { | |||
| npmLocal project(":djx") | |||
| } | |||
| def bundleDir = fileTree(layout.buildDirectory.dir("bundle")) { | |||
| builtBy "bundle" | |||
| } | |||
| npmInstall { | |||
| //npmInstall.dependsOn it | |||
| doFirst { | |||
| configurations.npmLocal.each { f -> | |||
| exec { | |||
| commandLine "npm", "install", f, "--save-dev" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| task processResourcesBundle(type: Copy) { | |||
| from "src/bundle" | |||
| into layout.buildDirectory.dir("bundle") | |||
| } | |||
| task copyModules(type: Copy) { | |||
| dependsOn npmInstall | |||
| into layout.buildDirectory.dir("bundle/js"); | |||
| def pack = { String jsmod -> | |||
| into(jsmod) { | |||
| from npm.module(jsmod) | |||
| } | |||
| } | |||
| pack("@implab/djx") | |||
| pack("dojo") | |||
| } | |||
| task copyApp(type: Copy) { | |||
| dependsOn assemble | |||
| from typescript.assemblyDir | |||
| into layout.buildDirectory.dir("bundle/js/app") | |||
| } | |||
| task bundle { | |||
| dependsOn copyModules, processResourcesBundle, copyApp | |||
| } |
