Adam: I was worried about how to provide a proper classpath. I forgot the dynamic nature of Groovy. However, still the serialized (?) action to be executed needs to be on the classpath.
Alex: I can't see how it is possible (if it is) in your proposal to retrieve models for mutliple evaluated projects in a single call (I'm not sure if traversing the project tree is possible when configuration on demand is used). Also how will the Gradle process be able to deserialize ConsumerAction? That is, how does it know the required classpath for the implementation of ConsumerAction? So, I would adjust your code somehow like this: public interface ConsumerAction<T> extends Serializable { Map<String, T> execute(Project... project); } public interface ConsumerActionExecutor { <T> Map<String, T> execute(ConsumerAction<T> action, ActionClassPath classPath); } Assuming a method: ConsumerActionExecutor ProjectConnection.actionExecutor(). The Maps above would map the fully qualified name of the project (e.g.: ":sub:leaf") to the model. I'm not sure what ActionClassPath should be. Perhaps a set of jar files? Using a set of jar files would disallow using classes loaded otherwise but do we need such classes? Also, I have changed ConsumerActionExecutor to work similar to an Executor of Java. I don't care much about it though. -- View this message in context: http://gradle.1045684.n5.nabble.com/Proposal-for-retrieving-multiple-types-of-models-from-a-project-in-a-single-pass-using-the-Tooling-AI-tp5711516p5711540.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