This is totally possible, but it's not in any way an 'automatic' feature. If
you provide a method on your convention object that accepts a Closure
parameter, Gradle should pass the closure from your build script to it, but
it's up to you to interpret the contents correctly. For simple properties
this is pretty straightforward as all you're REALLY doing is calling getters
and setters on the convention object itself. For the case you've described
you would need some additional logic to parse out the configuration details.

For the simple case, you can look at this plugin convention object I made
recently, which simply takes in the closure from the build script and
assigns itself as the closure delegate.
https://github.com/kellyrob99/gradle-jslint-plugin/blob/master/src/main/groovy/org/kar/jslint/gradle/plugin/JSLintPluginConvention.groovy

-- 
View this message in context: 
http://gradle.1045684.n5.nabble.com/List-of-values-as-convention-tp3381112p3382242.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to