This plugin is useful in multi-project gradle builds where bower.json
is used to declare dependencies between projects. It sets the cross project dependencies so that projects build in the correct order.
grunt default
example-lib-a: ../example-lib-a
it would iterate over all projects under the root project looking for a match:buildscript {
repositories {
maven {
url 'http://dl.bintray.com/palantir/releases'
}
}
dependencies {
classpath 'com.palantir:gradle-bowerdeps-plugin:0.1.0'
}
}
apply plugin: 'com.palantir.bowerdeps'
When ./gradlew build
is run, the assemble
task will cause each of the projects to be executed in order based on the inter-project dependencies.
The configuration block for the plugin looks like this.
bowerdeps {
// name of the task to run to build the bower main files
buildTask 'grunt_build'
// working directory where bower.json is located
workDir file('folder/containing/bower/manifest')
}
In each of these examples, running ./gradlew build
will cause the project to be built. ./gradlew assemble
also works.
You can utilize https://github.com/srs/gradle-grunt-plugin and the buildTask
will automatically be set to grunt_default
.
apply plugin: 'com.moowork.grunt'
apply plugin: 'com.palantir.bowerdeps'
apply plugin: 'com.moowork.grunt'
apply plugin: 'com.palantir.bowerdeps'
bowerdeps {
buildTask 'grunt_build'
}
You can utilize https://github.com/srs/gradle-gulp-plugin and the buildTask
will automatically be set to gulp_default
.
apply plugin: 'com.moowork.gulp'
apply plugin: 'com.palantir.bowerdeps'
apply plugin: 'com.moowork.gulp'
apply plugin: 'com.palantir.bowerdeps'
bowerdeps {
buildTask 'gulp_build'
}
apply plugin: 'com.palantir.bowerdeps'
bowerdeps {
// Any valid task name will work here
buildTask 'customBuild'
}
task customBuild(type: Exec) {
// You can put an arbitrary command here
commandLine './buildScript.sh'
}