AlanKrueger wrote:
> 
> If I put my sub-project specific build configuration in the root
> build.gradle, the classpath when invoking the plugin is such that it can't
> find one of its own classes using Class.forName.
> 

Not sure what causes your particular problem, but Class.forName() should
definitely be replaced with getClass().getClassLoader().

Class.forName() has known problems and should not be used in any new Java
code. When called from alternative languages like Groovy, it is even less
likely to work correctly.

--
Peter Niederwieser
Principal Engineer, Gradleware 
http://gradleware.com
Creator, Spock Framework 
http://spockframework.org
Blog: http://pniederw.wordpress.com
Twitter: @pniederw


--
View this message in context: 
http://gradle.1045684.n5.nabble.com/Classpath-differences-in-sub-project-build-gradle-files-tp4426268p4435383.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to