Maybe these layout scripts could be pluggable layout strategies which include an implementation of RootFinder and the methods's I've seen on AbstractProject which deal with file system and project navigation.
On Fri, Aug 29, 2008 at 7:58 AM, Dennis Portello <[EMAIL PROTECTED]>wrote: > This sounds great, almost exactly what I was pondering. I think it might > make also sense to have two sets of defaults, a hierarchical and flat layout > which could be detected by Gradle. Looking through the source code yesterday > I was contemplating how you could provide alternative layouts and have them > picked-up automatically when invoking a build from any directory > (sub-project). > > Also, it might make sense to have a series of named layouts predefined in a > gradle_home settings file/script which could be referenced from any project > settings file, the two defaults being "flat" and "hirearchical". > > -Dennis > > On Fri, Aug 29, 2008 at 2:50 AM, Adam Murdoch <[EMAIL PROTECTED]>wrote: > >> Hi, >> >> I would like to start talking about 'arbitrary project layouts': what that >> means, how we might solve the problem, and what can we do to move towards >> the solution. >> >> To me, it means being able to control the location of any file or >> directory that gradle uses to load stuff, cache stuff, and generate stuff. >> It also means having reasonable defaults for all of these things, so I don't >> need to care if I don't want to. >> >> Currently, the locations for each project are: >> - project directory >> - build file location >> - build directory >> - build file cache directory >> >> There's also name and path for each project. These aren't locations as >> such, but their default values are determined by locations, and there's no >> way to override their defaults. >> >> Additionally, the locations for the build (or maybe the root project): >> - root directory >> - settings file location >> - settings file cache directory >> - inter-project build resolver directory >> - ivy cache directory >> - wrapper dist cache directory >> - probably some other things like default imports file(s), >> plugin.properties, etc. >> >> I'd like to be able to declare most of these locations in a file (or >> files) . Then I can do things like check them into source control and have >> the same layout on multiple machines, or share the same layout between >> several people. Even better if those files are scripts so that I can write >> code to declare my layout. >> >> Overriding default locations from the command line is not really something >> I want to be able to do, but I guess it should be possible for most of the >> above locations. >> >> The obvious place for most of these locations is in the settings file. >> Some don't really make sense there (eg settings cache dir). One option for >> these would be to add a gradle init script in gradle user home which can >> override pretty much anything. >> >> The things that make sense to do through the settings file are: >> - build resolver directory >> - ivy cache directory >> - for each project: >> - name >> - path (not for the root project) >> - project dir >> - build file >> - build dir >> >> I'll leave it for another email to discuss how I think this might work, >> and how the command-line might work. >> >> >> Adam >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > >
