Peter Niederwieser wrote:
Adam Murdoch-2 wrote:
  
Yes. Any method declared in a script is made available as a method on 
the corresponding Project object.

    

OK, so given a multi-project build with sub-projects A and B, I can call
from A's build.gradle into B's build.gradle. But what I'd like to do is to
call from A's build.gradle into B.jar (the artifact generated by B).
According to my understanding, A's build.gradle cannot have a
configuration-time dependency on B.jar because Gradle first configures all
projects and only then executes them. But how about an execution-time
dependency?

  

Ah, I misunderstood your question.

There isn't a supported way to have a project's build depend on the artifacts of another projects. You could, however, do something ugly like have a task add the jars to the project classloader and use the classes as dynamic objects.

Alternatively, you could move the classes to the buildSrc project.

It might be interesting if we were to generalise the buildSrc concept a bit, so that a project can declare an execution time dependency on another project, where before any task of the dependent project is executed, the other project is built and its classes added to the dependent project's classloader.


Adam --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to