testing gradle as replacement for maven, we have a build.gradle file that contains the following plugins
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "com.moowork.gradle:gradle-grunt-plugin:0.6"
classpath 'org.akhikhl.gretty:gretty:+'
}
}
apply plugin: 'scala'
apply plugin: "com.moowork.grunt"
apply plugin: 'war'
apply plugin: 'org.akhikhl.gretty'
./gradlew appStart
and ./gradlew grunt_dev
run fine from the console.
However when adding the line
appStart.dependsOn grunt_dev
to the script, ./gradlew appStart
fails with
Could not find property 'appStart' on root project 'blah'.
Why is the appStart
task visible from the gradle wrapper and not inside the script ?
Documentation on gretty appStart
UPDATE
Following @Opal explanation below, the following allowed hooking the tasks together
//Tasks defined in plugins are added after all projects are evaluated
//We have to hook after the evaluation to prevent an evaluation failure
project.afterEvaluate {
project.tasks.appStart.dependsOn grunt_dev
}