Example #1
0
 /**
  * Creates the {@link BuildInternal} and {@link ProjectInternal} instances for the given root
  * project, ready for the projects to be evaluated.
  */
 public BuildInternal load(
     ProjectDescriptor rootProjectDescriptor,
     ClassLoader buildScriptClassLoader,
     StartParameter startParameter,
     Map<String, String> externalProjectProperties) {
   logger.debug("Loading Project objects");
   Clock clock = new Clock();
   DefaultBuild build =
       createProjects(
           rootProjectDescriptor,
           buildScriptClassLoader,
           startParameter,
           externalProjectProperties);
   ProjectInternal currentProject =
       (ProjectInternal)
           build.getRootProject().getProjectRegistry().getProject(startParameter.getCurrentDir());
   assert currentProject != null;
   build.setCurrentProject(currentProject);
   logger.debug("Timing: Loading projects took: " + clock.getTime());
   return build;
 }