On 10/02/2011, at 2:36 AM, Spencer Allain wrote: > I'm attempting to change the behavior of a task depending upon whether it can > resolve the dependencies it requires (as they will not be available from all > build locations) > > While I can catch the ResolveException from explicitly calling resolve() I do > not see any convenient way to not have the "WARNINGS module not found" > messages being displayed to the user. > > I suppose I could disable logging just before the resolve call and in a > finally block after it is tested. Is there a less brute force way to test a > dependency resolution without the warning messages? >
Not really, but this would be a good thing to add - some way to do dependency resolution, but collecting the failures for later querying by the caller. Could you add a jira issue for this problem? It think there are lots of uses for something like this. For example, the 'dependencies' task would be able to make use of this, to generate a report in the face of failures, and report on missing dependencies and other problems. Or an IDE integration could use it to display problems with the dependencies (eg the Eclipse 'problems' tab) -- Adam Murdoch Gradle Developer http://www.gradle.org CTO, Gradle Inc. - Gradle Training, Support, Consulting http://www.gradle.biz
