On Feb 24, 2009, at 10:56 PM, JerodLass wrote:


UPDATE: I am now able to set the project paths correctly and while taking advantage of the arbitrary multi-project layout system. I thought this was working, but it turns out that I was leaning on a lot of cached files. The problem I have is that I use the project.rootDir property a lot in my builds (for locating common lib directories, resources, etc) and these are now
relative to my Build directory rather than the real root.

How can I reset the virtual root project? My current project layout is
currently:
-DProject1
   -DSubProject1
       -Fbuild.gradle
   -DSubProject2
       -Fbuild.gradle
   -DResources
   -DBuild
-Fbuild.gradle (root build file, formerly in Project1 directory)
       -Fsettings.gradle

And I am executing "gradle clean libs" from the Build directory, which is now the root project, but I would still like Project1 to be the root project
so that any build.gradle can reference and use (project.rootDir,
"Resources"). This was rooted in my original wish to remove individual
files from the root of my CVS repository.

Thanks for any and all help.

I don't think this is possible at the moment. Could you file a Jira (I don't know what makes sense here yet, but it would be good to have this use case in mind)? For 0.7 one focus is to improve complex multi- project set up scenarios.

You could make Resources also a project (just declare it in the settings.gradle). Then you could access it from anywhere with project(':Resources').projectDir

- Hans



Jerod


JerodLass wrote:

Yes, I am trying to execute from the ProjectBuild directory. Originally, everything was working with the first layout I described (and had been since gradle 0.3), with the top-level build.gradle and settings.gradle in
the main project directory, and subproject build scripts in their
respective subdirectories.
Then, trying to take advantage of arbitrary multi-project layouts, I moved the top-level files into the ProjectBuild directory, which is on the same level as the subproject directories. I just want to keep the top- level
build files in a separate cvs module with some other files.

From:
-D Project
  -D SubProject1
     -F build.gradle
  -D SubProject2
     -F build.gradle
  -F build.gradle
  -F settings.gradle
to:
-D Project
  -D SubProject1
     -F build.gradle
  -D SubProject2
     -F build.gradle
  -D ProjectBuild
     -F build.gradle (this is virtually the top-level script which
defines a lot of behavior for subprojects)
     -F settings.gradle

And the build didn't start until I changed the top-level build.gradle
line:
include 'SubProject1', 'SubProject2' //in the original script
to:
includeFlat 'SubProject1', 'SubProject2' //in the new script, within
ProjectBuild

And now I get the error. I agree that the plugins do not seem to be in
the classpaths of the build.gradle files (note: each subproject's
build.gradle file also uses a plugin declared in the settings.gradle
file).


--
View this message in context: 
http://www.nabble.com/arbitrary-multi-project-layouts-tp21294101p22191555.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



--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

   http://xircles.codehaus.org/manage_email


Reply via email to