Peter Niederwieser wrote:
Maybe I should explain what I'm trying to achieve: I have written some code
to find all JUnit test cases under a base directory by their annotations
(setting me free from naming conventions). Now I'd like to put this code
into one project of a two-project build, and use it from the other project's
build script. Is this possible?
Yes. Any method declared in a script is made available as a method on
the corresponding Project object. So, you can do something like:
project1.gradle:
def someMethod() { ... }
project2.gradle:
project(':project1').someMethod()
Also, these methods are also inherited by child projects, so you can put
the method in the root project and have it inherited by both projects:
root.gradle:
def someMethod() {}
project1.gradle
someMethod()
Adam
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email