Is NPE in Gradle (including 1.5-rc-1) due to bug in Gradle or unsupported use of Gradle?


(Jesper Skov) #1

Our build logic defines dependencies in the main project which is used to exted dependencies in sub-projects. The details are documented in GRADLE-2689.

This has been causing NPE in Gradle since 1.0-milestone-4 - including in the new 1.5.-rc-1.

I wonder if it is behaving as intended (bad build logic), or a bug in Gradle?

(sorry, didn’t mean to hijack the 1.5-rc-1 announcement thread)


(Peter Niederwieser) #2

Looks like a bug to me. It’s not common to extend from a configuration of another project. Avoiding that might solve the problem.


(Jesper Skov) #3

Maybe it is not common.

But it is a good way to model the way that web applications in a java EAR application have their classpath defined at runtime.

That is, they have their own local classpath (WEB-INF/lib) and if classes are not found there, the parent EAR file’s classpath is searched.

I kind of like the way it maps to dependencies in Gradle, and that they can extend from the parent project’s dependencies.

But of course, I may have to bite the bullet and make a big global dependency definition instead, if I want to upgrade (and the bug doesn’t get fixed). Ho hum…

Thanks.