Hi Peter, On Oct 30, 2008, at 8:13 PM, Peter Niederwieser wrote:
What's the preferred way to track JUnit test execution when invoking a Gradle-based Java/Groovy build 1. programmatically 2. on the command-line?
Right now we delegate the test execution to the Ant JUnit task. I don't know how the JetBrains guys hook into into this for there Ant Teamcity runner.
What we want to do for 0.6 is to rewrite our Test task to natively run the tests. Then we can provide listeners for test execution.
To get hold of a task instance programmatically you can register a BuildListener. It has projectsEvaluated method which provided a Build object. This build object gives you access to the tasks. I hope this is of use to you. Anyway, please ping us if we can do anything to help you.
From the command-line you can't hook into the build lifecycle yet. In the future we want to support init scripts, which would solve this problem (right now we only support property files).
I'm asking because I'm exploring ways to write a Gradle plugin for TeamCity.
This is excellent news :) - Hans -- Hans Dockter Gradle Project lead http://www.gradle.org --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
