I fully agree that we need to solve this problem. However, I'd rather not
want to be forced into creating a class around a dynamic property. One
alternative would be to require the use of a "dyn" namespace for setting
dynamic properties (somewhat similar to your properties block):
dyn.foo = 3
...
println foo // no qualification needed
Another approach would be to reserve the "foo = bar" syntax for dynamic
properties, and do all configuration with "foo bar":
exec {
executable "my.exe"
args "one", "two"
foo = bar
}
This would make for a nice visual distinction between the declarative and
imperative. Actually I have something bigger in mind here (more flexible
mapping between DSL and domain model), but I don't want to distract from the
current discussion.
Cheers,
Peter
--
View this message in context:
http://gradle.1045684.n5.nabble.com/Dynamic-properties-for-projects-and-tasks-tp3378988p3379152.html
Sent from the gradle-dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email