evgeny-goldin / gradle-plugins

Gradle plugins
http://evgeny-goldin.com/wiki/Gradle_Plugins
Other
27 stars 4 forks source link

Delay task evaluation so that Plugin extension is configured first #9

Closed johnrengelman closed 10 years ago

johnrengelman commented 10 years ago

The node plugin allows for configuring the tasks that are added to the project through the node.runTasks property but the extension is not evaluated before the plugin processes this setting during the apply(Project) method. This uses project.afterEvaluate to delay the tasks creation until the build script is fully evaluated.

evgeny-goldin commented 10 years ago

Changes were merged but then changed again - adding tasks after project has evaluated makes it impossible to reference them in a build script, like when declaring defaultTasks. However, BasePlugin now evaluates extension first, please see if it works for you. Updated SNAPSHOT is available at: http://evgenyg.artifactoryonline.com/evgenyg/repo/com/github/goldin/plugins/gradle/node/0.3.2-SNAPSHOT/