On 17 Jan 2014, at 2:40 pm, Xavier Ducrohet <x...@google.com> wrote:

> Hello,
> 
> It seems that subsequent builds done with the daemon are using brand new 
> instances of custom classes instead of reusing the ones loaded on the first 
> build? Is that correct?

It’s unspecified at the moment. Right now it happens to recreate the 
ClassLoaders on each build, but we do plan to change this soon, as having the 
plugin and build script classes warmed gives a nice improvement to build 
execution time and allows plugins to do things like in-memory caching. It also 
slows down permgen leaks too.

> 
> I'm trying to dynamically load a jar file only once during the build so that 
> it's reused by all the tasks for all the modules, and it seems that repeat 
> build will trigger a new load.

Why do you need to do this? Are you loading stuff out of the SDK that the task 
implementations use?

> This is a perfect behavior for me since I don't have to deal with unloading 
> it, but I wanted to make sure that this was expected.

It’s the current behaviour, but you shouldn’t count on it.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com



Reply via email to