John Murph wrote:
On Tue, Sep 1, 2009 at 7:44 PM, Adam Murdoch <[email protected] <mailto:[email protected]>> wrote:

    I've changed the script compilation to cache all scripts under
    ~/.gradle/scriptCache. An advantage of this is we no longer end up
    with .gradle directories scattered all through the source tree
    (unless you end up using an internal repository). The downside is
    we will need some way to garbage collect this cache. This isn't
    actually a new problem, because we needed to solve this any way -
    It's just more important now.


I like have a single place for the cache (although I was thinking about putting the cache is the root project directory).

This would be a good option. Unfortunately, we can't cache the scripts until we know where the root project dir is, which is a bit late for init and settings scripts.

I wonder if Gradle might not want to always have a "clean" task (even if not using a plugin) that would clean the ~/.gradle stuff that is used for the current project. The Java plugin could then make it's "clean" task depend on this default task (or maybe not... I know we've talked about having clean delete the script caches because they can get out of sync and cause problems, but maybe that's just a bug that needs to get fixed). I don't really like Gradle always defining a task, but this seems more like a task than a command line option.

The idea of using a task to clean up the caches is a good one. I would use something other than 'clean'. I really don't want Gradle to recompile my build scripts, or re-download dependencies, or re-hash my source files, or re-calculating source file dependencies after I've done a 'clean', because these things are inputs to my build, and aren't actually affected by deleting my build output.


Adam

Reply via email to